Old APIs focus fixes (#692)

* Movie button focus fix in TV layout

* Cast item focusable in old API

* Media description focus fix in old API

* Switch account button focus fix in old APi
This commit is contained in:
KingLucius 2023-10-23 19:38:53 +03:00 committed by GitHub
parent 2a4468eb44
commit 48053164dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 1 deletions

View file

@ -575,6 +575,7 @@ class ResultFragmentTv : Fragment() {
observeNullable(viewModel.movie) { data -> observeNullable(viewModel.movie) { data ->
binding?.apply { binding?.apply {
resultPlayMovie.isVisible = data is Resource.Success resultPlayMovie.isVisible = data is Resource.Success
resultPlaySeries.isVisible = data == null
seriesHolder.isVisible = data == null seriesHolder.isVisible = data == null
resultEpisodesShow.isVisible = data == null resultEpisodesShow.isVisible = data == null

View file

@ -9,7 +9,7 @@
android:layout_margin="5dp" android:layout_margin="5dp"
android:foreground="@drawable/outline_drawable" android:foreground="@drawable/outline_drawable"
app:cardBackgroundColor="@color/transparent" app:cardBackgroundColor="@color/transparent"
android:focusable="true"
app:cardCornerRadius="@dimen/rounded_image_radius" app:cardCornerRadius="@dimen/rounded_image_radius"
app:cardElevation="0dp"> app:cardElevation="0dp">

View file

@ -140,6 +140,7 @@
android:layout_gravity="end" android:layout_gravity="end"
android:background="@drawable/player_button_tv_attr_no_bg" android:background="@drawable/player_button_tv_attr_no_bg"
android:contentDescription="@string/account" android:contentDescription="@string/account"
android:focusable="true"
android:nextFocusLeft="@id/home_preview_search_button" android:nextFocusLeft="@id/home_preview_search_button"
android:nextFocusRight="@id/home_switch_account" android:nextFocusRight="@id/home_switch_account"
android:nextFocusDown="@id/home_change_api" android:nextFocusDown="@id/home_change_api"

View file

@ -419,6 +419,7 @@ https://developer.android.com/design/ui/tv/samples/jet-fit
android:fadingEdgeLength="30dp" android:fadingEdgeLength="30dp"
android:foreground="@drawable/outline_drawable" android:foreground="@drawable/outline_drawable"
android:maxLines="7" android:maxLines="7"
android:focusable="true"
android:nextFocusUp="@id/result_back" android:nextFocusUp="@id/result_back"
android:nextFocusDown="@id/result_bookmark_button" android:nextFocusDown="@id/result_bookmark_button"
android:padding="5dp" android:padding="5dp"