Search code examples
androidandroid-5.0-lollipopandroid-tv

Android TV Preferences Standard


When viewing the Android TV preferences and the built in apps such as YouTube, they appear to use a standard layout as shown here:

Preference Screen 1

Preference Screen 2

I cannot find any examples of implementing preferences on Android TV and can not find the above layouts referenced in any of the LeanBack etc libraries.

Is this a "standard" that I can reuse (like the normal Android PreferenceFragment) or do I have to design my own preference system?

The first image could be duplicated with the LeanBack "BrowseFragment" but the lower one cannot be implemented using anything that I have so far found.


Solution

  • UPDATE

    The new support libraries have just been released. All hail GuidedStepFragment! It should be exactly what you were looking for.


    No, unfortunately that view is not provided as a standalone widget in the Leanback library. If you want to take a look for yourself, see here.

    It can be implemented quite easily, but alas, you're on your own.