Search code examples
androidleanback

is GuidedStepFragment for android Mobile or only android TV?


The fragment is included in android.support.v17.leanback.app.GuidedStepFragment which is apart of Leanback library.

I think Leanback is for Android TV, will GuidedStepFragment work if i try to implement it in a mobile device?

Here is an example of the fragment in action: https://youtu.be/RhXuihvQ4Lg


Solution

  • Leanback is a library specifically designed for TV, as stated on developer.android.com:

    v17 Leanback Library
    The android.support.v17.leanback package provides APIs to support building user interfaces on TV devices. It provides a number of important widgets for TV apps.

    But Nothing prevent you to use the widgets available in the library in your mobile app for Android 4.2 and higher. You will probably have to make some adaptations since the Android TV have a different kind of interaction (TV remote and game controller) compared to the mobile device.

    You can make a quick test of the GuidedStepFragment running the Android TV Leanback example on your mobile device and selecting:

    More Samples > Guided Step First