Merge pull request #2061 from nEdAy/feature/add-highlight-focus-item-on-tv

新增 高亮焦点 为 Android TV 模式(首页- 书架/发现/订阅/我的);
This commit is contained in:
kunfei
2022-07-11 14:50:00 +08:00
committed by GitHub
6 changed files with 14 additions and 3 deletions
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@color/btn_bg_press" android:state_focused="true" />
</selector>
+2 -1
View File
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:drawable="@color/btn_bg_press" />
<item android:drawable="@color/btn_bg_press" android:state_focused="true" />
<item android:drawable="@color/btn_bg_press" android:state_pressed="true" />
</selector>
@@ -7,6 +7,7 @@
android:layout_height="wrap_content"
android:clickable="true"
android:focusable="true"
android:background="@drawable/bg_item_focused_on_tv"
tools:ignore="UnusedAttribute">
@@ -7,6 +7,7 @@
android:layout_height="wrap_content"
android:clickable="true"
android:focusable="true"
android:background="@drawable/bg_item_focused_on_tv"
tools:ignore="UnusedAttribute">
<io.legado.app.ui.widget.image.CoverImageView
+3 -1
View File
@@ -5,7 +5,9 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical">
android:orientation="vertical"
android:focusable="true"
android:background="@drawable/bg_item_focused_on_tv">
<LinearLayout
android:id="@+id/ll_title"
+3 -1
View File
@@ -4,7 +4,9 @@
xmlns:tools="http://schemas.android.com/tools"
android:padding="16dp"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:focusable="true"
android:background="@drawable/bg_item_focused_on_tv">
<io.legado.app.ui.widget.image.FilletImageView
android:id="@+id/iv_icon"