1

How do I get the title of the individual rows to always appear instead of only when it is selected? Like the example here in Youtube app, "Uploads" and "Popular Uploads" should always be seen.

enter image description here

Sammys
  • 1,443
  • 5
  • 14
  • 21

1 Answers1

0

I just answered this question here, but the general gist is:

I was able to achieve this affect by calling setExpand(true) as the first line of my onCreateView() in my RowsFragment.

If you want to lock this effect forever, you can override setExpand(...) in your RowsFragment and just call super.setExpand(true). I believe you'll still need the initial call in onCreateView() though.

Community
  • 1
  • 1
Kyle Venn
  • 4,597
  • 27
  • 41
  • Are you using a custom RowFragment for this? When I try to setExpand(true), getRowFragment returns null – Sammys Oct 05 '16 at 00:33
  • Yes, I'm using a custom RowsFragment. The class that those calls go into is your subclass of `RowsFragment`. If you're unfamiliar with leanback, you can check out [this example](https://github.com/googlesamples/leanback-showcase) and [this example](https://github.com/googlesamples/androidtv-Leanback) provided by the leanback team. – Kyle Venn Oct 05 '16 at 13:41