forked from recloudstream/cloudstream
Added outlines to more things to increase accessibility on Android TV
This commit is contained in:
parent
f7b623ffc7
commit
4f54bf3ae4
5 changed files with 157 additions and 145 deletions
5
app/src/main/res/color/white_transparent_toggle.xml
Normal file
5
app/src/main/res/color/white_transparent_toggle.xml
Normal 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>
|
|
@ -1,148 +1,149 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginBottom="60dp"
|
android:layout_marginBottom="60dp"
|
||||||
android:baselineAligned="false"
|
android:baselineAligned="false"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/sort_sources_holder"
|
android:id="@+id/sort_sources_holder"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="50"
|
android:layout_weight="50"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_rowWeight="1"
|
android:layout_rowWeight="1"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
|
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
|
||||||
android:paddingTop="10dp"
|
android:paddingTop="10dp"
|
||||||
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
|
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
|
||||||
android:paddingBottom="10dp"
|
android:paddingBottom="10dp"
|
||||||
android:text="@string/pick_source"
|
android:text="@string/pick_source"
|
||||||
android:textColor="?attr/textColor"
|
android:textColor="?attr/textColor"
|
||||||
android:textSize="20sp"
|
android:textSize="20sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
<ListView
|
<ListView
|
||||||
android:requiresFadingEdge="vertical"
|
android:id="@+id/sort_providers"
|
||||||
android:id="@+id/sort_providers"
|
android:layout_width="match_parent"
|
||||||
android:layout_width="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:layout_rowWeight="1"
|
||||||
android:layout_height="match_parent"
|
android:background="?attr/primaryBlackBackground"
|
||||||
android:layout_rowWeight="1"
|
android:listSelector="@drawable/outline_drawable_less"
|
||||||
android:background="?attr/primaryBlackBackground"
|
android:nextFocusLeft="@id/sort_subtitles"
|
||||||
android:nextFocusLeft="@id/sort_subtitles"
|
android:nextFocusRight="@id/apply_btt"
|
||||||
android:nextFocusRight="@id/apply_btt"
|
android:requiresFadingEdge="vertical"
|
||||||
tools:listitem="@layout/sort_bottom_single_choice" />
|
tools:listitem="@layout/sort_bottom_single_choice" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/sort_subtitles_holder"
|
android:id="@+id/sort_subtitles_holder"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="50"
|
android:layout_weight="50"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<!-- android:id="@+id/subs_settings" android:foreground="?android:attr/selectableItemBackgroundBorderless"
|
<!-- android:id="@+id/subs_settings" android:foreground="?android:attr/selectableItemBackgroundBorderless"
|
||||||
-->
|
-->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
tools:ignore="UseCompoundDrawables">
|
tools:ignore="UseCompoundDrawables">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:foreground="?attr/selectableItemBackgroundBorderless"
|
android:id="@+id/subtitles_click_settings"
|
||||||
android:id="@+id/subtitles_click_settings"
|
android:layout_width="match_parent"
|
||||||
android:layout_rowWeight="1"
|
android:layout_height="wrap_content"
|
||||||
android:paddingTop="10dp"
|
android:layout_rowWeight="1"
|
||||||
android:paddingBottom="10dp"
|
android:layout_marginTop="10dp"
|
||||||
android:layout_marginTop="10dp"
|
android:background="@drawable/outline_drawable_less"
|
||||||
android:orientation="horizontal"
|
android:foreground="?attr/selectableItemBackgroundBorderless"
|
||||||
android:layout_width="match_parent"
|
android:orientation="horizontal"
|
||||||
android:layout_height="wrap_content">
|
android:paddingTop="10dp"
|
||||||
|
android:paddingBottom="10dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
|
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
|
||||||
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
|
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
|
||||||
android:text="@string/pick_subtitle"
|
android:text="@string/pick_subtitle"
|
||||||
android:textColor="?attr/textColor"
|
android:textColor="?attr/textColor"
|
||||||
android:textSize="20sp"
|
android:textSize="20sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:textSize="15sp"
|
android:id="@+id/subtitles_encoding_format"
|
||||||
android:id="@+id/subtitles_encoding_format"
|
android:layout_width="wrap_content"
|
||||||
android:textColor="?attr/textColor"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
tools:text="Thai (TIS 620-2533/ISO 8859-11)"
|
android:textColor="?attr/textColor"
|
||||||
android:layout_width="wrap_content"
|
android:textSize="15sp"
|
||||||
android:layout_height="wrap_content" />
|
tools:text="Thai (TIS 620-2533/ISO 8859-11)" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="25dp"
|
android:layout_width="25dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="end|center_vertical"
|
android:layout_gravity="end|center_vertical"
|
||||||
android:layout_marginTop="0dp"
|
android:layout_marginTop="0dp"
|
||||||
android:layout_marginEnd="10dp"
|
android:layout_marginEnd="10dp"
|
||||||
|
|
||||||
android:contentDescription="@string/home_change_provider_img_des"
|
android:contentDescription="@string/home_change_provider_img_des"
|
||||||
android:src="@drawable/ic_outline_settings_24"
|
android:src="@drawable/ic_outline_settings_24"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<ListView
|
<ListView
|
||||||
android:requiresFadingEdge="vertical"
|
android:id="@+id/sort_subtitles"
|
||||||
android:id="@+id/sort_subtitles"
|
android:layout_width="match_parent"
|
||||||
android:layout_width="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:layout_rowWeight="1"
|
||||||
android:layout_height="match_parent"
|
android:background="?attr/primaryBlackBackground"
|
||||||
android:layout_rowWeight="1"
|
android:listSelector="@drawable/outline_drawable_less"
|
||||||
android:background="?attr/primaryBlackBackground"
|
android:nextFocusLeft="@id/sort_providers"
|
||||||
android:nextFocusLeft="@id/sort_providers"
|
android:nextFocusRight="@id/cancel_btt"
|
||||||
android:nextFocusRight="@id/cancel_btt"
|
android:requiresFadingEdge="vertical"
|
||||||
tools:listfooter="@layout/sort_bottom_footer_add_choice"
|
tools:listfooter="@layout/sort_bottom_footer_add_choice"
|
||||||
tools:listitem="@layout/sort_bottom_single_choice" />
|
tools:listitem="@layout/sort_bottom_single_choice" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/apply_btt_holder"
|
android:id="@+id/apply_btt_holder"
|
||||||
android:orientation="horizontal"
|
android:layout_width="match_parent"
|
||||||
android:layout_gravity="bottom"
|
android:layout_height="60dp"
|
||||||
android:gravity="bottom|end"
|
android:layout_gravity="bottom"
|
||||||
android:layout_marginTop="-60dp"
|
android:layout_marginTop="-60dp"
|
||||||
android:layout_width="match_parent"
|
android:gravity="bottom|end"
|
||||||
android:layout_height="60dp">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
<com.google.android.material.button.MaterialButton
|
||||||
style="@style/WhiteButton"
|
android:id="@+id/apply_btt"
|
||||||
android:layout_gravity="center_vertical|end"
|
style="@style/WhiteButton"
|
||||||
android:text="@string/sort_apply"
|
android:layout_width="wrap_content"
|
||||||
android:id="@+id/apply_btt"
|
android:layout_gravity="center_vertical|end"
|
||||||
android:layout_width="wrap_content" />
|
android:text="@string/sort_apply" />
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
<com.google.android.material.button.MaterialButton
|
||||||
style="@style/BlackButton"
|
android:id="@+id/cancel_btt"
|
||||||
android:layout_gravity="center_vertical|end"
|
style="@style/BlackButton"
|
||||||
android:text="@string/sort_cancel"
|
android:layout_width="wrap_content"
|
||||||
android:id="@+id/cancel_btt"
|
android:layout_gravity="center_vertical|end"
|
||||||
android:layout_width="wrap_content" />
|
android:text="@string/sort_cancel" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
|
@ -1,39 +1,42 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:id="@+id/home_history_tab"
|
||||||
android:layout_height="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:orientation="horizontal"
|
android:layout_height="wrap_content"
|
||||||
android:id="@+id/home_history_tab"
|
android:background="@drawable/outline_drawable_less"
|
||||||
android:foreground="?android:attr/selectableItemBackgroundBorderless"
|
android:foreground="?android:attr/selectableItemBackgroundBorderless"
|
||||||
android:nextFocusRight="@id/home_history_remove">
|
android:nextFocusRight="@id/home_history_remove"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/home_history_title"
|
android:id="@+id/home_history_title"
|
||||||
android:textColor="?attr/textColor"
|
android:layout_width="wrap_content"
|
||||||
android:textSize="18sp"
|
android:layout_height="wrap_content"
|
||||||
tools:text="Hello World"
|
android:padding="10dp"
|
||||||
android:padding="10dp"
|
android:textColor="?attr/textColor"
|
||||||
android:layout_width="wrap_content"
|
android:textSize="18sp"
|
||||||
android:layout_height="wrap_content"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintBottom_toBottomOf="parent" />
|
tools:text="Hello World" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:padding="10dp"
|
android:id="@+id/home_history_remove"
|
||||||
android:id="@+id/home_history_remove"
|
android:layout_width="wrap_content"
|
||||||
android:nextFocusLeft="@id/home_history_tab"
|
android:layout_height="match_parent"
|
||||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
android:layout_gravity="center_vertical|end"
|
||||||
|
|
||||||
android:src="@drawable/ic_baseline_close_24"
|
android:background="@drawable/outline_drawable_less"
|
||||||
android:layout_width="wrap_content"
|
android:foreground="?android:attr/selectableItemBackgroundBorderless"
|
||||||
android:layout_gravity="center_vertical|end"
|
|
||||||
android:layout_height="match_parent"
|
android:nextFocusLeft="@id/home_history_tab"
|
||||||
app:tint="?attr/white"
|
android:padding="10dp"
|
||||||
tools:ignore="ContentDescription"
|
android:src="@drawable/ic_baseline_close_24"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent" />
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:tint="?attr/white"
|
||||||
|
tools:ignore="ContentDescription" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
style="@style/CheckLabel"
|
android:id="@android:id/text1"
|
||||||
tools:text="hello"
|
style="@style/CheckLabel"
|
||||||
android:id="@android:id/text1" />
|
tools:text="hello" />
|
||||||
|
|
|
@ -70,6 +70,8 @@
|
||||||
|
|
||||||
<style name="ListViewStyle" parent="Widget.AppCompat.ListView">
|
<style name="ListViewStyle" parent="Widget.AppCompat.ListView">
|
||||||
<item name="android:divider">@null</item>
|
<item name="android:divider">@null</item>
|
||||||
|
<item name="android:listSelector">@drawable/outline_drawable_less</item>
|
||||||
|
<item name="android:drawSelectorOnTop">false</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="AmoledModeLight" parent="AmoledMode">
|
<style name="AmoledModeLight" parent="AmoledMode">
|
||||||
|
@ -78,7 +80,8 @@
|
||||||
|
|
||||||
<style name="ChipFilled" parent="@style/Widget.Material3.Chip.Filter">
|
<style name="ChipFilled" parent="@style/Widget.Material3.Chip.Filter">
|
||||||
<item name="chipBackgroundColor">@color/chip_color</item>
|
<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="textColor">@color/chip_color_text</item>
|
||||||
<item name="android:textColor">@color/chip_color_text</item>
|
<item name="android:textColor">@color/chip_color_text</item>
|
||||||
<item name="checkedIconTint">@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:paddingStart">20dp</item>
|
||||||
<item name="android:paddingEnd">20dp</item>
|
<item name="android:paddingEnd">20dp</item>
|
||||||
<item name="android:selectAllOnFocus">true</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:textColor">?attr/textColor</item>
|
||||||
<item name="android:foreground">?attr/selectableItemBackgroundBorderless</item>
|
<item name="android:foreground">?attr/selectableItemBackgroundBorderless</item>
|
||||||
<item name="android:textAppearance">?android:attr/textAppearanceListItemSmall</item>
|
<item name="android:textAppearance">?android:attr/textAppearanceListItemSmall</item>
|
||||||
|
|
Loading…
Reference in a new issue