Reputation: 237
In my TV App, I need to implement the fixed Header in BrowseFragment like Youtube App. Below I have attached the screenshot how I want.
I'm implemented purely with Lean Back, my fragment is extended with browsefragment and I'm able to add icon and text to my header item.
Like below link they explained:
when focus moves to the right side, my header is collapsing fully. In my case, I want to collapse the header into little and need to show only icons in the header.
Upvotes: 7
Views: 2410
Reputation: 1148
This type of functionality is not supported in Leanback. And I too searched the solution for it everywhere but didn't find anything useful. So I ended up writing a Fragment that behaves like the sidebar navigation and works with RowsSupportFragment through an interface for exchanging KeyPad Events.
When in Expanded State -> Menu Icon & Menu Names are shown.
When in Collapsed State -> Menu Icons are shown.
Check out this Repository
Upvotes: 5