androidandroid-tvleanbackbrowsefragment

How to remove headers from BrowseFragment?


I am working on an android TV app and I am using the leanback library.

I want to customize the app layout "BrowseFragment". I want to remove the header view and only display the card list "rows".

Is it possible to do that or is there any other solution to achieve that?

I want to remove that


Solution

  • You have to set the HeaderState like this:

    @Override
    public void onActivityCreated(Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
        setHeadersState(HEADERS_DISABLED); // Add this line
    }