Building my first Android TV application and got kinda confused.
I'm using androidTV-leanback library.
The root problem: I've two functions. One is for getting back to previous fragment (using popBackStackImmediate();
) and other one for creatingLayout();
. Both work, but the layout is made alot faster than I return to MainFragment (where I can see navigation drawer) which makes a BIG DELAY.
My solution (in thoughts): I could simply call creatingLayout();
when I get the focus of specific navigation drawer header item.
Question: Is it possible to get a header item focus (items name/some kind of an id) - by function/insert your solution?
I want to know on every user movement active header items name/id. For instance - "Category 3".
https://i.stack.imgur.com/vlRir.png
Is this correct way of thinking about my problem? Maybe there's another approach I could use?