mirror of
https://github.com/jellyfin/jellyfin-androidtv.git
synced 2026-10-26 16:45:23 +00:00
Automatically focus grid within EnhancedBrowseFragment
This commit is contained in:
1 parent
4f97f16338
commit
22fbde87e8
2 files changed
+14
-1
No files matched your search
@@ -0,0 +1,13 @@
|
||||
package org.jellyfin.androidtv.ui.browsing
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import androidx.leanback.app.RowsSupportFragment
|
||||
|
||||
open class AutoFocusRowsFragment : RowsSupportFragment() {
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
verticalGridView.requestFocus()
|
||||
}
|
||||
}
|
||||
@@ -128,7 +128,7 @@ public class EnhancedBrowseFragment extends Fragment implements RowLoader, View.
|
||||
|
||||
// Inject the RowsSupportFragment in the results container
|
||||
if (getChildFragmentManager().findFragmentById(R.id.rowsFragment) == null) {
|
||||
mRowsFragment = new RowsSupportFragment();
|
||||
mRowsFragment = new AutoFocusRowsFragment();
|
||||
getChildFragmentManager()
|
||||
.beginTransaction()
|
||||
.replace(R.id.rowsFragment, mRowsFragment).commit();
|
||||
|
||||
Reference in new issue
Block a user