Leanback rowsfragment

1.9k views Asked by At

Actually I'm developing an app for Android TV. I used the BrowseFragment, from leanback support library v17, to navigate by the submenus. But, now I'm trying to build the home activity, like Android TV device app. You can see it here: https://medium.com/building-for-android-tv/building-for-android-tv-episode-1-2d03f9ba541e. And I have problems to know how i can to make a simple row layout, like recommendations. I've tried to do it with a RowsFragment class but ever i have an error inflating XML. Just I would like the BrowseFragment without the left "drawer".

Thank you four your time and sorry for my poor english.

1

There are 1 answers

0
mpwhitt On BEST ANSWER

Inside of your activity that extends BrowseFragment, this will remove the left drawer with the headings...

setHeadersState(HEADERS_DISABLED);

If you're using the Android TV sample app, this would be in the MainFragment class in the following method...

setupUIElements()