Added outlines to more things to increase accessibility on Android TV

This commit is contained in:
Blatzar 2022-12-09 00:37:59 +01:00
parent f7b623ffc7
commit 4f54bf3ae4
5 changed files with 157 additions and 145 deletions

View file

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_focused="true" android:color="?attr/white"/>
<item android:color="@color/transparent"/>
</selector>

View file

@ -35,15 +35,15 @@
android:textStyle="bold" />
<ListView
android:requiresFadingEdge="vertical"
android:id="@+id/sort_providers"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_rowWeight="1"
android:background="?attr/primaryBlackBackground"
android:listSelector="@drawable/outline_drawable_less"
android:nextFocusLeft="@id/sort_subtitles"
android:nextFocusRight="@id/apply_btt"
android:requiresFadingEdge="vertical"
tools:listitem="@layout/sort_bottom_single_choice" />
</LinearLayout>
@ -63,15 +63,16 @@
tools:ignore="UseCompoundDrawables">
<LinearLayout
android:foreground="?attr/selectableItemBackgroundBorderless"
android:id="@+id/subtitles_click_settings"
android:layout_rowWeight="1"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:layout_marginTop="10dp"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:layout_rowWeight="1"
android:layout_marginTop="10dp"
android:background="@drawable/outline_drawable_less"
android:foreground="?attr/selectableItemBackgroundBorderless"
android:orientation="horizontal"
android:paddingTop="10dp"
android:paddingBottom="10dp">
<TextView
android:layout_width="wrap_content"
@ -84,14 +85,14 @@
android:textStyle="bold" />
<TextView
android:textSize="15sp"
android:id="@+id/subtitles_encoding_format"
android:textColor="?attr/textColor"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
tools:text="Thai (TIS 620-2533/ISO 8859-11)"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
android:textColor="?attr/textColor"
android:textSize="15sp"
tools:text="Thai (TIS 620-2533/ISO 8859-11)" />
</LinearLayout>
<ImageView
@ -107,15 +108,15 @@
</LinearLayout>
<ListView
android:requiresFadingEdge="vertical"
android:id="@+id/sort_subtitles"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_rowWeight="1"
android:background="?attr/primaryBlackBackground"
android:listSelector="@drawable/outline_drawable_less"
android:nextFocusLeft="@id/sort_providers"
android:nextFocusRight="@id/cancel_btt"
android:requiresFadingEdge="vertical"
tools:listfooter="@layout/sort_bottom_footer_add_choice"
tools:listitem="@layout/sort_bottom_single_choice" />
</LinearLayout>
@ -123,26 +124,26 @@
<LinearLayout
android:id="@+id/apply_btt_holder"
android:orientation="horizontal"
android:layout_gravity="bottom"
android:gravity="bottom|end"
android:layout_marginTop="-60dp"
android:layout_width="match_parent"
android:layout_height="60dp">
android:layout_height="60dp"
android:layout_gravity="bottom"
android:layout_marginTop="-60dp"
android:gravity="bottom|end"
android:orientation="horizontal">
<com.google.android.material.button.MaterialButton
style="@style/WhiteButton"
android:layout_gravity="center_vertical|end"
android:text="@string/sort_apply"
android:id="@+id/apply_btt"
android:layout_width="wrap_content" />
style="@style/WhiteButton"
android:layout_width="wrap_content"
android:layout_gravity="center_vertical|end"
android:text="@string/sort_apply" />
<com.google.android.material.button.MaterialButton
style="@style/BlackButton"
android:layout_gravity="center_vertical|end"
android:text="@string/sort_cancel"
android:id="@+id/cancel_btt"
android:layout_width="wrap_content" />
style="@style/BlackButton"
android:layout_width="wrap_content"
android:layout_gravity="center_vertical|end"
android:text="@string/sort_cancel" />
</LinearLayout>
</LinearLayout>

View file

@ -2,38 +2,41 @@
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/home_history_tab"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:id="@+id/home_history_tab"
android:background="@drawable/outline_drawable_less"
android:foreground="?android:attr/selectableItemBackgroundBorderless"
android:nextFocusRight="@id/home_history_remove">
android:nextFocusRight="@id/home_history_remove"
android:orientation="horizontal">
<TextView
android:id="@+id/home_history_title"
android:textColor="?attr/textColor"
android:textSize="18sp"
tools:text="Hello World"
android:padding="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="10dp"
android:textColor="?attr/textColor"
android:textSize="18sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent" />
tools:text="Hello World" />
<ImageView
android:padding="10dp"
android:id="@+id/home_history_remove"
android:nextFocusLeft="@id/home_history_tab"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:src="@drawable/ic_baseline_close_24"
android:layout_width="wrap_content"
android:layout_gravity="center_vertical|end"
android:layout_height="match_parent"
app:tint="?attr/white"
tools:ignore="ContentDescription"
android:layout_gravity="center_vertical|end"
android:background="@drawable/outline_drawable_less"
android:foreground="?android:attr/selectableItemBackgroundBorderless"
android:nextFocusLeft="@id/home_history_tab"
android:padding="10dp"
android:src="@drawable/ic_baseline_close_24"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
app:tint="?attr/white"
tools:ignore="ContentDescription" />
</androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -15,6 +15,6 @@
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@android:id/text1"
style="@style/CheckLabel"
tools:text="hello"
android:id="@android:id/text1" />
tools:text="hello" />

View file

@ -70,6 +70,8 @@
<style name="ListViewStyle" parent="Widget.AppCompat.ListView">
<item name="android:divider">@null</item>
<item name="android:listSelector">@drawable/outline_drawable_less</item>
<item name="android:drawSelectorOnTop">false</item>
</style>
<style name="AmoledModeLight" parent="AmoledMode">
@ -78,7 +80,8 @@
<style name="ChipFilled" parent="@style/Widget.Material3.Chip.Filter">
<item name="chipBackgroundColor">@color/chip_color</item>
<item name="chipStrokeColor">@color/transparent</item>
<item name="chipStrokeColor">@color/white_transparent_toggle</item>
<item name="chipStrokeWidth">2dp</item>
<item name="textColor">@color/chip_color_text</item>
<item name="android:textColor">@color/chip_color_text</item>
<item name="checkedIconTint">@color/chip_color_text</item>
@ -455,7 +458,7 @@
<item name="android:paddingStart">20dp</item>
<item name="android:paddingEnd">20dp</item>
<item name="android:selectAllOnFocus">true</item>
<item name="android:background">@color/transparent</item>
<item name="android:background">@drawable/outline_drawable_less</item>
<item name="android:textColor">?attr/textColor</item>
<item name="android:foreground">?attr/selectableItemBackgroundBorderless</item>
<item name="android:textAppearance">?android:attr/textAppearanceListItemSmall</item>