Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix focus in home screen when navigating back #2243

Merged
merged 2 commits into from
Nov 8, 2022

Conversation

nielsvanvelzen
Copy link
Member

Beta blocker 1 / 2 3

Changes

Leanback library does some weird stuff with the items in RowsSupportFragment so we need some hacks to fix the focus when resuming the fragment. This wasn't an issue before because it behaved differently in an activity.

  • Rewrite HomeFragment a bit so we don't do fragment in fragment for the toolbar and don't use a fragment transaction for the rows. This increases performance a bit and allows for the second change
  • Focus HomeRowsFragment by default

Issues

@nielsvanvelzen nielsvanvelzen added the bug Something isn't working label Nov 6, 2022
@nielsvanvelzen nielsvanvelzen added this to the v0.15.0 milestone Nov 6, 2022
@nielsvanvelzen nielsvanvelzen changed the title Home focus Fix focus in home screen when navigating back Nov 6, 2022
android:descendantFocusability="afterDescendants"
android:focusable="true"
android:focusableInTouchMode="true"
android:focusedByDefault="true">

Check warning

Code scanning / Android Lint

Attribute unused on older versions

Attribute focusedByDefault is only used in API level 26 and higher (current min is 21)
@nielsvanvelzen nielsvanvelzen merged commit f53dba8 into jellyfin:master Nov 8, 2022
@nielsvanvelzen nielsvanvelzen deleted the home-focus branch November 8, 2022 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant