Remote focus fixes (classic UI)

This commit is contained in:
nikk gitanes 2019-12-24 22:58:10 +03:00 committed by John Wu
parent e88b1cc443
commit 3c2041933f
7 changed files with 18 additions and 2 deletions

View File

@ -59,6 +59,8 @@
android:layout_gravity="bottom|center_horizontal" android:layout_gravity="bottom|center_horizontal"
android:layout_margin="@dimen/fab_padding" android:layout_margin="@dimen/fab_padding"
android:onClick="@{() -> viewModel.fabPressed()}" android:onClick="@{() -> viewModel.fabPressed()}"
android:focusable="true"
android:clickable="true"
app:fabSize="normal" app:fabSize="normal"
app:layout_behavior="com.google.android.material.floatingactionbutton.FloatingActionButton$Behavior" app:layout_behavior="com.google.android.material.floatingactionbutton.FloatingActionButton$Behavior"
app:srcCompat="@drawable/ic_add" /> app:srcCompat="@drawable/ic_add" />

View File

@ -16,6 +16,7 @@
</data> </data>
<TextView <TextView
android:focusable="true"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:fontFamily="monospace" android:fontFamily="monospace"

View File

@ -94,6 +94,8 @@
<androidx.appcompat.widget.AppCompatImageView <androidx.appcompat.widget.AppCompatImageView
android:id="@+id/hide_app_checkbox" android:id="@+id/hide_app_checkbox"
android:focusable="true"
android:clickable="true"
style="@style/Widget.Icon" style="@style/Widget.Icon"
isChecked="@{item.isHiddenState}" isChecked="@{item.isHiddenState}"
android:onClick="@{() -> item.toggle()}" android:onClick="@{() -> item.toggle()}"

View File

@ -38,6 +38,8 @@
<androidx.appcompat.widget.AppCompatImageView <androidx.appcompat.widget.AppCompatImageView
android:id="@+id/hide_process_icon" android:id="@+id/hide_process_icon"
android:focusable="true"
android:clickable="true"
style="@style/Widget.Icon" style="@style/Widget.Icon"
isChecked="@{item.isHidden}" isChecked="@{item.isHidden}"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"

View File

@ -106,6 +106,8 @@
<androidx.appcompat.widget.AppCompatImageView <androidx.appcompat.widget.AppCompatImageView
android:id="@+id/checkbox" android:id="@+id/checkbox"
android:focusable="true"
android:clickable="true"
style="@style/Widget.Icon" style="@style/Widget.Icon"
isChecked="@{item.isChecked}" isChecked="@{item.isChecked}"
android:layout_marginEnd="@dimen/margin_generic" android:layout_marginEnd="@dimen/margin_generic"
@ -127,6 +129,8 @@
<androidx.appcompat.widget.AppCompatImageView <androidx.appcompat.widget.AppCompatImageView
android:id="@+id/delete" android:id="@+id/delete"
android:focusable="true"
android:clickable="true"
style="@style/Widget.Icon" style="@style/Widget.Icon"
srcCompat="@{item.isDeletable ? R.drawable.ic_undelete : R.drawable.ic_delete}" srcCompat="@{item.isDeletable ? R.drawable.ic_undelete : R.drawable.ic_delete}"
android:onClick="@{() -> item.toggleDelete()}" android:onClick="@{() -> item.toggleDelete()}"

View File

@ -29,6 +29,7 @@
items="@{item.items}" items="@{item.items}"
scrollPosition="@={viewModel.scrollPosition}" scrollPosition="@={viewModel.scrollPosition}"
scrollPositionSmooth="@{true}" scrollPositionSmooth="@{true}"
android:focusable="true"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical" android:orientation="vertical"
@ -39,6 +40,8 @@
<com.google.android.material.floatingactionbutton.FloatingActionButton <com.google.android.material.floatingactionbutton.FloatingActionButton
hide="@{viewModel.scrollPosition == item.items.size - 1 || item.items.size == 0}" hide="@{viewModel.scrollPosition == item.items.size - 1 || item.items.size == 0}"
android:focusable="true"
android:clickable="true"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="bottom|end" android:layout_gravity="bottom|end"

View File

@ -105,6 +105,8 @@
<androidx.appcompat.widget.AppCompatImageView <androidx.appcompat.widget.AppCompatImageView
android:id="@+id/download" android:id="@+id/download"
android:focusable="true"
android:clickable="true"
style="@style/Widget.Icon" style="@style/Widget.Icon"
isEnabled="@{viewModel.isConnected}" isEnabled="@{viewModel.isConnected}"
android:alpha="@{viewModel.isConnected ? 1f : .2f}" android:alpha="@{viewModel.isConnected ? 1f : .2f}"