Skip to content

Commit

Permalink
Old APIs focus fixes (#692)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
KingLucius authored Oct 23, 2023
1 parent 2a4468e commit 4805316
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,7 @@ class ResultFragmentTv : Fragment() {
observeNullable(viewModel.movie) { data ->
binding?.apply {
resultPlayMovie.isVisible = data is Resource.Success
resultPlaySeries.isVisible = data == null
seriesHolder.isVisible = data == null
resultEpisodesShow.isVisible = data == null

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/cast_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
android:layout_margin="5dp"
android:foreground="@drawable/outline_drawable"
app:cardBackgroundColor="@color/transparent"

android:focusable="true"
app:cardCornerRadius="@dimen/rounded_image_radius"
app:cardElevation="0dp">

Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/layout/fragment_home_tv.xml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@
android:layout_gravity="end"
android:background="@drawable/player_button_tv_attr_no_bg"
android:contentDescription="@string/account"
android:focusable="true"
android:nextFocusLeft="@id/home_preview_search_button"
android:nextFocusRight="@id/home_switch_account"
android:nextFocusDown="@id/home_change_api"
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/layout/fragment_result_tv.xml
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,7 @@ https://developer.android.com/design/ui/tv/samples/jet-fit
android:fadingEdgeLength="30dp"
android:foreground="@drawable/outline_drawable"
android:maxLines="7"
android:focusable="true"
android:nextFocusUp="@id/result_back"
android:nextFocusDown="@id/result_bookmark_button"
android:padding="5dp"
Expand Down

0 comments on commit 4805316

Please sign in to comment.