# OnboardingFragment

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  
belongs to Maven artifact com.android.support:leanback-v17:28.0.0-alpha1  
Deprecated since version 27.1.0  
Summary:[XML Attrs](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#lattrs)\|[Inherited Constants](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#inhconstants)\|[Ctors](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#pubctors)\|[Methods](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#pubmethods)\|[Protected Methods](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#promethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#inhmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#)  

# OnboardingFragment

| This package is part of the Android[support library](https://developer.android.com/topic/libraries/support-library)which is no longer maintained. The support library has been superseded by[AndroidX](https://developer.android.com/jetpack/androidx)which is part of[Jetpack](https://developer.android.com/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider[migrating](https://developer.android.com/jetpack/androidx/migrate)existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library[class mappings](https://developer.android.com/jetpack/androidx/migrate/class-mappings).

`
public


abstract
class
OnboardingFragment
`  
`


``

extends `[Fragment](https://developer.android.com/reference/android/app/Fragment.html)`


``


`

|---|---|-----------------------------------------------------|
| java.lang.Object                                          |||
| ↳ | [android.app.Fragment](https://developer.android.com/reference/android/app/Fragment.html) ||
|   | ↳ | android.support.v17.leanback.app.OnboardingFragment |

<br />

*** ** * ** ***

<br />

**This class was deprecated in API level 27.1.0.**   
use[OnboardingSupportFragment](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingSupportFragment)

An OnboardingFragment provides a common and simple way to build onboarding screen for applications.

<br />

### Building the screen

The view structure of onboarding screen is composed of the common parts and custom parts. The common parts are composed of icon, title, description and page navigator and the custom parts are composed of background, contents and foreground.

To build the screen views, the inherited class should override:

- [onCreateBackgroundView(LayoutInflater, ViewGroup)](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#onCreateBackgroundView(android.view.LayoutInflater, android.view.ViewGroup))to provide the background view. Background view has the same size as the screen and the lowest z-order.
- [onCreateContentView(LayoutInflater, ViewGroup)](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#onCreateContentView(android.view.LayoutInflater, android.view.ViewGroup))to provide the contents view. The content view is located in the content area at the center of the screen.
- [onCreateForegroundView(LayoutInflater, ViewGroup)](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#onCreateForegroundView(android.view.LayoutInflater, android.view.ViewGroup))to provide the foreground view. Foreground view has the same size as the screen and the highest z-order

Each of these methods can return`null`if the application doesn't want to provide it.

<br />

### Page information

The onboarding screen may have several pages which explain the functionality of the application. The inherited class should provide the page information by overriding the methods:

<br />

- [getPageCount()](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#getPageCount())to provide the number of pages.
- [getPageTitle(int)](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#getPageTitle(int))to provide the title of the page.
- [getPageDescription(int)](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#getPageDescription(int))to provide the description of the page.

Note that the information is used in[onCreateView(LayoutInflater, ViewGroup, Bundle)](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle)), so should be initialized before calling`super.onCreateView`.

<br />

### Animation

Onboarding screen has three kinds of animations:

<br />

#### Logo Splash Animation

When onboarding screen appears, the logo splash animation is played by default. The animation fades in the logo image, pauses in a few seconds and fades it out.

In most cases, the logo animation needs to be customized because the logo images of applications are different from each other, or some applications may want to show their own animations.

The logo animation can be customized in two ways:

- The simplest way is to provide the logo image by calling[setLogoResourceId(int)](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#setLogoResourceId(int))to show the default logo animation. This method should be called in[onCreateView(LayoutInflater, ViewGroup, Bundle)](https://developer.android.com/reference/android/app/Fragment.html#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle)).
- If the logo animation is complex, then override[onCreateLogoAnimation()](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#onCreateLogoAnimation())and return the[Animator](https://developer.android.com/reference/android/animation/Animator.html)object to run.

If the inherited class provides neither the logo image nor the animation, the logo animation will be omitted.

#### Page enter animation

After logo animation finishes, page enter animation starts, which causes the header section - title and description views to fade and slide in. Users can override the default fade + slide animation by overriding[onCreateTitleAnimator()](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#onCreateTitleAnimator())\&[onCreateDescriptionAnimator()](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#onCreateDescriptionAnimator()). By default we don't animate the custom views but users can provide animation by overriding[onCreateEnterAnimation()](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#onCreateEnterAnimation()).

#### Page change animation

When the page changes, the default animations of the title and description are played. The inherited class can override[onPageChanged(int, int)](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#onPageChanged(int, int))to start the custom animations.

<br />

### Finishing the screen

If the user finishes the onboarding screen after navigating all the pages,[onFinishFragment()](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#onFinishFragment())is called. The inherited class can override this method to show another fragment or activity, or just remove this fragment.

<br />

### Theming

OnboardingFragment must have access to an appropriate theme. Specifically, the fragment must receive[Theme_Leanback_Onboarding](https://developer.android.com/reference/android/support/v17/leanback/R.style#Theme_Leanback_Onboarding), or a theme whose parent is set to that theme. Themes can be provided in one of three ways:

- The simplest way is to set the theme for the host Activity to the Onboarding theme or a theme that derives from it.
- If the Activity already has a theme and setting its parent theme is inconvenient, the existing Activity theme can have an entry added for the attribute[LeanbackOnboardingTheme_onboardingTheme](https://developer.android.com/reference/android/support/v17/leanback/R.styleable#LeanbackOnboardingTheme_onboardingTheme). If present, this theme will be used by OnboardingFragment as an overlay to the Activity's theme.
- Finally, custom subclasses of OnboardingFragment may provide a theme through the[onProvideTheme()](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#onProvideTheme())method. This can be useful if a subclass is used across multiple Activities.

If the theme is provided in multiple ways, the onProvideTheme override has priority, followed by the Activity's theme. (Themes whose parent theme is already set to the onboarding theme do not need to set the onboardingTheme attribute; if set, it will be ignored.)

## Summary

|                                                                                                      ### XML attributes                                                                                                      ||
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [`LeanbackOnboardingTheme_onboardingDescriptionStyle`](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#attr_LeanbackOnboardingTheme_onboardingDescriptionStyle)               |   |
| [`LeanbackOnboardingTheme_onboardingHeaderStyle`](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#attr_LeanbackOnboardingTheme_onboardingHeaderStyle)                         |   |
| [`LeanbackOnboardingTheme_onboardingLogoStyle`](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#attr_LeanbackOnboardingTheme_onboardingLogoStyle)                             |   |
| [`LeanbackOnboardingTheme_onboardingNavigatorContainerStyle`](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#attr_LeanbackOnboardingTheme_onboardingNavigatorContainerStyle) |   |
| [`LeanbackOnboardingTheme_onboardingPageIndicatorStyle`](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#attr_LeanbackOnboardingTheme_onboardingPageIndicatorStyle)           |   |
| [`LeanbackOnboardingTheme_onboardingStartButtonStyle`](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#attr_LeanbackOnboardingTheme_onboardingStartButtonStyle)               |   |
| [`LeanbackOnboardingTheme_onboardingTheme`](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#attr_LeanbackOnboardingTheme_onboardingTheme)                                     |   |
| [`LeanbackOnboardingTheme_onboardingTitleStyle`](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#attr_LeanbackOnboardingTheme_onboardingTitleStyle)                           |   |

|                                                                                                                                                                                                                                                                                                                 ### Inherited constants                                                                                                                                                                                                                                                                                                                 |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#)From interface` android.content.ComponentCallbacks2 ` |-------|---------------------------------------| | `int` | `TRIM_MEMORY_BACKGROUND` <br />       | | `int` | `TRIM_MEMORY_COMPLETE` <br />         | | `int` | `TRIM_MEMORY_MODERATE` <br />         | | `int` | `TRIM_MEMORY_RUNNING_CRITICAL` <br /> | | `int` | `TRIM_MEMORY_RUNNING_LOW` <br />      | | `int` | `TRIM_MEMORY_RUNNING_MODERATE` <br /> | | `int` | `TRIM_MEMORY_UI_HIDDEN` <br />        | |

|                                                              ### Public constructors                                                              ||
|------------------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[OnboardingFragment](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#OnboardingFragment())`() ` |

|                                                                                                                                                                                                                                                                                  ### Public methods                                                                                                                                                                                                                                                                                   ||
|---------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` final int`                                                              | ` `[getArrowBackgroundColor](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#getArrowBackgroundColor())`() ` Returns the background color of the arrow if it's set through[setArrowBackgroundColor(int)](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#setArrowBackgroundColor(int)).                                                                                                                            |
| ` final int`                                                              | ` `[getArrowColor](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#getArrowColor())`() ` Returns the color of the arrow if it's set through[setArrowColor(int)](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#setArrowColor(int)).                                                                                                                                                                               |
| ` final int`                                                              | ` `[getDescriptionViewTextColor](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#getDescriptionViewTextColor())`() ` Returns the text color of DescriptionView if it's set through[setDescriptionViewTextColor(int)](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#setDescriptionViewTextColor(int)).                                                                                                            |
| ` final int`                                                              | ` `[getDotBackgroundColor](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#getDotBackgroundColor())`() ` Returns the background color of the dot if it's set through[setDotBackgroundColor(int)](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#setDotBackgroundColor(int)).                                                                                                                                      |
| ` final int`                                                              | ` `[getIconResourceId](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#getIconResourceId())`() ` Returns the resource id of the main icon.                                                                                                                                                                                                                                                                                                                     |
| ` final int`                                                              | ` `[getLogoResourceId](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#getLogoResourceId())`() ` Returns the resource ID of the splash logo image.                                                                                                                                                                                                                                                                                                             |
| ` final CharSequence`                                                     | ` `[getStartButtonText](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#getStartButtonText())`() ` Returns the start button text if it's set through[setStartButtonText(CharSequence)](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#setStartButtonText(java.lang.CharSequence))}.                                                                                                                               |
| ` final int`                                                              | ` `[getTitleViewTextColor](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#getTitleViewTextColor())`() ` Returns the text color of TitleView if it's set through[setTitleViewTextColor(int)](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#setTitleViewTextColor(int)).                                                                                                                                          |
| ` `[View](https://developer.android.com/reference/android/view/View.html) | ` `[onCreateView](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle))`(`[LayoutInflater](https://developer.android.com/reference/android/view/LayoutInflater.html)` inflater, `[ViewGroup](https://developer.android.com/reference/android/view/ViewGroup.html)` container, `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` savedInstanceState) ` |
| ` int`                                                                    | ` `[onProvideTheme](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#onProvideTheme())`() ` Returns the theme used for styling the fragment.                                                                                                                                                                                                                                                                                                                    |
| ` void`                                                                   | ` `[onSaveInstanceState](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#onSaveInstanceState(android.os.Bundle))`(`[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` outState) `                                                                                                                                                                                                                                                       |
| ` void`                                                                   | ` `[onViewCreated](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#onViewCreated(android.view.View, android.os.Bundle))`(`[View](https://developer.android.com/reference/android/view/View.html)` view, `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` savedInstanceState) `                                                                                                                                                       |
| ` void`                                                                   | ` `[setArrowBackgroundColor](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#setArrowBackgroundColor(int))`(int color) ` Sets the background color of the arrow.                                                                                                                                                                                                                                                                                               |
| ` void`                                                                   | ` `[setArrowColor](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#setArrowColor(int))`(int color) ` Sets the color of the arrow.                                                                                                                                                                                                                                                                                                                              |
| ` void`                                                                   | ` `[setDescriptionViewTextColor](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#setDescriptionViewTextColor(int))`(int color) ` Sets the text color for DescriptionView.                                                                                                                                                                                                                                                                                      |
| ` void`                                                                   | ` `[setDotBackgroundColor](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#setDotBackgroundColor(int))`(int color) ` Sets the background color of the dots.                                                                                                                                                                                                                                                                                                    |
| ` final void`                                                             | ` `[setIconResouceId](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#setIconResouceId(int))`(int resourceId) ` Sets the resource id for the main icon.                                                                                                                                                                                                                                                                                                        |
| ` final void`                                                             | ` `[setLogoResourceId](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#setLogoResourceId(int))`(int id) ` Sets the resource ID of the splash logo image.                                                                                                                                                                                                                                                                                                       |
| ` void`                                                                   | ` `[setStartButtonText](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#setStartButtonText(java.lang.CharSequence))`(CharSequence text) ` Sets the text on the start button text.                                                                                                                                                                                                                                                                              |
| ` void`                                                                   | ` `[setTitleViewTextColor](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#setTitleViewTextColor(int))`(int color) ` Sets the text color for TitleView.                                                                                                                                                                                                                                                                                                        |

|                                                                                                                                                                                                                                                                      ### Protected methods                                                                                                                                                                                                                                                                      ||
|----------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` final int`                                                                           | ` `[getCurrentPageIndex](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#getCurrentPageIndex())`() ` Returns the index of the current page.                                                                                                                                                                                                                                                                                 |
| ` abstract int`                                                                        | ` `[getPageCount](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#getPageCount())`() ` Returns the page count.                                                                                                                                                                                                                                                                                                              |
| ` abstract CharSequence`                                                               | ` `[getPageDescription](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#getPageDescription(int))`(int pageIndex) ` Returns the description of the given page.                                                                                                                                                                                                                                                               |
| ` abstract CharSequence`                                                               | ` `[getPageTitle](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#getPageTitle(int))`(int pageIndex) ` Returns the title of the given page.                                                                                                                                                                                                                                                                                 |
| ` final boolean`                                                                       | ` `[isLogoAnimationFinished](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#isLogoAnimationFinished())`() ` Returns whether the logo enter animation is finished.                                                                                                                                                                                                                                                          |
| ` void`                                                                                | ` `[moveToNextPage](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#moveToNextPage())`() ` Navigates to the next page.                                                                                                                                                                                                                                                                                                      |
| ` void`                                                                                | ` `[moveToPreviousPage](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#moveToPreviousPage())`() ` Navigates to the previous page.                                                                                                                                                                                                                                                                                          |
| ` abstract `[View](https://developer.android.com/reference/android/view/View.html)     | ` `[onCreateBackgroundView](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#onCreateBackgroundView(android.view.LayoutInflater, android.view.ViewGroup))`(`[LayoutInflater](https://developer.android.com/reference/android/view/LayoutInflater.html)` inflater, `[ViewGroup](https://developer.android.com/reference/android/view/ViewGroup.html)` container) ` Called to have the inherited class create background view. |
| ` abstract `[View](https://developer.android.com/reference/android/view/View.html)     | ` `[onCreateContentView](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#onCreateContentView(android.view.LayoutInflater, android.view.ViewGroup))`(`[LayoutInflater](https://developer.android.com/reference/android/view/LayoutInflater.html)` inflater, `[ViewGroup](https://developer.android.com/reference/android/view/ViewGroup.html)` container) ` Called to have the inherited class create content view.          |
| ` `[Animator](https://developer.android.com/reference/android/animation/Animator.html) | ` `[onCreateDescriptionAnimator](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#onCreateDescriptionAnimator())`() ` Provides the entry animation for description view.                                                                                                                                                                                                                                                     |
| ` `[Animator](https://developer.android.com/reference/android/animation/Animator.html) | ` `[onCreateEnterAnimation](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#onCreateEnterAnimation())`() ` Called to have the inherited class create its enter animation.                                                                                                                                                                                                                                                   |
| ` abstract `[View](https://developer.android.com/reference/android/view/View.html)     | ` `[onCreateForegroundView](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#onCreateForegroundView(android.view.LayoutInflater, android.view.ViewGroup))`(`[LayoutInflater](https://developer.android.com/reference/android/view/LayoutInflater.html)` inflater, `[ViewGroup](https://developer.android.com/reference/android/view/ViewGroup.html)` container) ` Called to have the inherited class create foreground view. |
| ` `[Animator](https://developer.android.com/reference/android/animation/Animator.html) | ` `[onCreateLogoAnimation](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#onCreateLogoAnimation())`() ` Called to have the inherited class create its own logo animation.                                                                                                                                                                                                                                                  |
| ` `[Animator](https://developer.android.com/reference/android/animation/Animator.html) | ` `[onCreateTitleAnimator](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#onCreateTitleAnimator())`() ` Provides the entry animation for title view.                                                                                                                                                                                                                                                                       |
| ` void`                                                                                | ` `[onFinishFragment](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#onFinishFragment())`() ` Called when the onboarding flow finishes.                                                                                                                                                                                                                                                                                    |
| ` void`                                                                                | ` `[onLogoAnimationFinished](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#onLogoAnimationFinished())`() ` Called immediately after the logo animation is complete or no logo animation is specified.                                                                                                                                                                                                                     |
| ` void`                                                                                | ` `[onPageChanged](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#onPageChanged(int, int))`(int newPage, int previousPage) ` Called when the page has been changed.                                                                                                                                                                                                                                                        |
| ` final void`                                                                          | ` `[startEnterAnimation](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#startEnterAnimation(boolean))`(boolean force) ` Called to start entrance transition.                                                                                                                                                                                                                                                               |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#)From class` `[android.app.Fragment](https://developer.android.com/reference/android/app/Fragment.html)` ` |------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` void`                                                                                              | ` dump(String arg0, FileDescriptor arg1, PrintWriter arg2, String[] arg3) `                                                                                                                                                                                                                                                                     | | ` final boolean`                                                                                     | ` equals(Object arg0) `                                                                                                                                                                                                                                                                                                                         | | ` final `[Activity](https://developer.android.com/reference/android/app/Activity.html)               | ` getActivity() `                                                                                                                                                                                                                                                                                                                               | | ` boolean`                                                                                           | ` getAllowEnterTransitionOverlap() `                                                                                                                                                                                                                                                                                                            | | ` boolean`                                                                                           | ` getAllowReturnTransitionOverlap() `                                                                                                                                                                                                                                                                                                           | | ` final `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)                    | ` getArguments() `                                                                                                                                                                                                                                                                                                                              | | ` final `[FragmentManager](https://developer.android.com/reference/android/app/FragmentManager.html) | ` getChildFragmentManager() `                                                                                                                                                                                                                                                                                                                   | | ` `[Context](https://developer.android.com/reference/android/content/Context.html)                   | ` getContext() `                                                                                                                                                                                                                                                                                                                                | | ` `[Transition](https://developer.android.com/reference/android/transition/Transition.html)          | ` getEnterTransition() `                                                                                                                                                                                                                                                                                                                        | | ` `[Transition](https://developer.android.com/reference/android/transition/Transition.html)          | ` getExitTransition() `                                                                                                                                                                                                                                                                                                                         | | ` final `[FragmentManager](https://developer.android.com/reference/android/app/FragmentManager.html) | ` getFragmentManager() `                                                                                                                                                                                                                                                                                                                        | | ` final Object`                                                                                      | ` getHost() `                                                                                                                                                                                                                                                                                                                                   | | ` final int`                                                                                         | ` getId() `                                                                                                                                                                                                                                                                                                                                     | | ` final `[LayoutInflater](https://developer.android.com/reference/android/view/LayoutInflater.html)  | ` getLayoutInflater() `                                                                                                                                                                                                                                                                                                                         | | ` `[LoaderManager](https://developer.android.com/reference/android/app/LoaderManager.html)           | ` getLoaderManager() `                                                                                                                                                                                                                                                                                                                          | | ` final `[Fragment](https://developer.android.com/reference/android/app/Fragment.html)               | ` getParentFragment() `                                                                                                                                                                                                                                                                                                                         | | ` `[Transition](https://developer.android.com/reference/android/transition/Transition.html)          | ` getReenterTransition() `                                                                                                                                                                                                                                                                                                                      | | ` final `[Resources](https://developer.android.com/reference/android/content/res/Resources.html)     | ` getResources() `                                                                                                                                                                                                                                                                                                                              | | ` final boolean`                                                                                     | ` getRetainInstance() `                                                                                                                                                                                                                                                                                                                         | | ` `[Transition](https://developer.android.com/reference/android/transition/Transition.html)          | ` getReturnTransition() `                                                                                                                                                                                                                                                                                                                       | | ` `[Transition](https://developer.android.com/reference/android/transition/Transition.html)          | ` getSharedElementEnterTransition() `                                                                                                                                                                                                                                                                                                           | | ` `[Transition](https://developer.android.com/reference/android/transition/Transition.html)          | ` getSharedElementReturnTransition() `                                                                                                                                                                                                                                                                                                          | | ` final String`                                                                                      | ` getString(int arg0, Object... arg1) `                                                                                                                                                                                                                                                                                                         | | ` final String`                                                                                      | ` getString(int arg0) `                                                                                                                                                                                                                                                                                                                         | | ` final String`                                                                                      | ` getTag() `                                                                                                                                                                                                                                                                                                                                    | | ` final `[Fragment](https://developer.android.com/reference/android/app/Fragment.html)               | ` getTargetFragment() `                                                                                                                                                                                                                                                                                                                         | | ` final int`                                                                                         | ` getTargetRequestCode() `                                                                                                                                                                                                                                                                                                                      | | ` final CharSequence`                                                                                | ` getText(int arg0) `                                                                                                                                                                                                                                                                                                                           | | ` boolean`                                                                                           | ` getUserVisibleHint() `                                                                                                                                                                                                                                                                                                                        | | ` `[View](https://developer.android.com/reference/android/view/View.html)                            | ` getView() `                                                                                                                                                                                                                                                                                                                                   | | ` final int`                                                                                         | ` hashCode() `                                                                                                                                                                                                                                                                                                                                  | | ` static `[Fragment](https://developer.android.com/reference/android/app/Fragment.html)              | ` instantiate(`[Context](https://developer.android.com/reference/android/content/Context.html)` arg0, String arg1) `                                                                                                                                                                                                                            | | ` static `[Fragment](https://developer.android.com/reference/android/app/Fragment.html)              | ` instantiate(`[Context](https://developer.android.com/reference/android/content/Context.html)` arg0, String arg1, `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg2) `                                                                                                                                           | | ` final boolean`                                                                                     | ` isAdded() `                                                                                                                                                                                                                                                                                                                                   | | ` final boolean`                                                                                     | ` isDetached() `                                                                                                                                                                                                                                                                                                                                | | ` final boolean`                                                                                     | ` isHidden() `                                                                                                                                                                                                                                                                                                                                  | | ` final boolean`                                                                                     | ` isInLayout() `                                                                                                                                                                                                                                                                                                                                | | ` final boolean`                                                                                     | ` isRemoving() `                                                                                                                                                                                                                                                                                                                                | | ` final boolean`                                                                                     | ` isResumed() `                                                                                                                                                                                                                                                                                                                                 | | ` final boolean`                                                                                     | ` isStateSaved() `                                                                                                                                                                                                                                                                                                                              | | ` final boolean`                                                                                     | ` isVisible() `                                                                                                                                                                                                                                                                                                                                 | | ` void`                                                                                              | ` onActivityCreated(`[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg0) `                                                                                                                                                                                                                                          | | ` void`                                                                                              | ` onActivityResult(int arg0, int arg1, `[Intent](https://developer.android.com/reference/android/content/Intent.html)` arg2) `                                                                                                                                                                                                                  | | ` void`                                                                                              | ` onAttach(`[Activity](https://developer.android.com/reference/android/app/Activity.html)` arg0) `                                                                                                                                                                                                                                              | | ` void`                                                                                              | ` onAttach(`[Context](https://developer.android.com/reference/android/content/Context.html)` arg0) `                                                                                                                                                                                                                                            | | ` void`                                                                                              | ` onAttachFragment(`[Fragment](https://developer.android.com/reference/android/app/Fragment.html)` arg0) `                                                                                                                                                                                                                                      | | ` void`                                                                                              | ` onConfigurationChanged(`[Configuration](https://developer.android.com/reference/android/content/res/Configuration.html)` arg0) `                                                                                                                                                                                                              | | ` boolean`                                                                                           | ` onContextItemSelected(`[MenuItem](https://developer.android.com/reference/android/view/MenuItem.html)` arg0) `                                                                                                                                                                                                                                | | ` void`                                                                                              | ` onCreate(`[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg0) `                                                                                                                                                                                                                                                   | | ` `[Animator](https://developer.android.com/reference/android/animation/Animator.html)               | ` onCreateAnimator(int arg0, boolean arg1, int arg2) `                                                                                                                                                                                                                                                                                          | | ` void`                                                                                              | ` onCreateContextMenu(`[ContextMenu](https://developer.android.com/reference/android/view/ContextMenu.html)` arg0, `[View](https://developer.android.com/reference/android/view/View.html)` arg1, `[ContextMenu.ContextMenuInfo](https://developer.android.com/reference/android/view/ContextMenu.ContextMenuInfo.html)` arg2) `                | | ` void`                                                                                              | ` onCreateOptionsMenu(`[Menu](https://developer.android.com/reference/android/view/Menu.html)` arg0, `[MenuInflater](https://developer.android.com/reference/android/view/MenuInflater.html)` arg1) `                                                                                                                                           | | ` `[View](https://developer.android.com/reference/android/view/View.html)                            | ` onCreateView(`[LayoutInflater](https://developer.android.com/reference/android/view/LayoutInflater.html)` arg0, `[ViewGroup](https://developer.android.com/reference/android/view/ViewGroup.html)` arg1, `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg2) `                                                   | | ` void`                                                                                              | ` onDestroy() `                                                                                                                                                                                                                                                                                                                                 | | ` void`                                                                                              | ` onDestroyOptionsMenu() `                                                                                                                                                                                                                                                                                                                      | | ` void`                                                                                              | ` onDestroyView() `                                                                                                                                                                                                                                                                                                                             | | ` void`                                                                                              | ` onDetach() `                                                                                                                                                                                                                                                                                                                                  | | ` `[LayoutInflater](https://developer.android.com/reference/android/view/LayoutInflater.html)        | ` onGetLayoutInflater(`[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg0) `                                                                                                                                                                                                                                        | | ` void`                                                                                              | ` onHiddenChanged(boolean arg0) `                                                                                                                                                                                                                                                                                                               | | ` void`                                                                                              | ` onInflate(`[AttributeSet](https://developer.android.com/reference/android/util/AttributeSet.html)` arg0, `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg1) `                                                                                                                                                   | | ` void`                                                                                              | ` onInflate(`[Activity](https://developer.android.com/reference/android/app/Activity.html)` arg0, `[AttributeSet](https://developer.android.com/reference/android/util/AttributeSet.html)` arg1, `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg2) `                                                             | | ` void`                                                                                              | ` onInflate(`[Context](https://developer.android.com/reference/android/content/Context.html)` arg0, `[AttributeSet](https://developer.android.com/reference/android/util/AttributeSet.html)` arg1, `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg2) `                                                           | | ` void`                                                                                              | ` onLowMemory() `                                                                                                                                                                                                                                                                                                                               | | ` void`                                                                                              | ` onMultiWindowModeChanged(boolean arg0) `                                                                                                                                                                                                                                                                                                      | | ` void`                                                                                              | ` onMultiWindowModeChanged(boolean arg0, `[Configuration](https://developer.android.com/reference/android/content/res/Configuration.html)` arg1) `                                                                                                                                                                                              | | ` boolean`                                                                                           | ` onOptionsItemSelected(`[MenuItem](https://developer.android.com/reference/android/view/MenuItem.html)` arg0) `                                                                                                                                                                                                                                | | ` void`                                                                                              | ` onOptionsMenuClosed(`[Menu](https://developer.android.com/reference/android/view/Menu.html)` arg0) `                                                                                                                                                                                                                                          | | ` void`                                                                                              | ` onPause() `                                                                                                                                                                                                                                                                                                                                   | | ` void`                                                                                              | ` onPictureInPictureModeChanged(boolean arg0, `[Configuration](https://developer.android.com/reference/android/content/res/Configuration.html)` arg1) `                                                                                                                                                                                         | | ` void`                                                                                              | ` onPictureInPictureModeChanged(boolean arg0) `                                                                                                                                                                                                                                                                                                 | | ` void`                                                                                              | ` onPrepareOptionsMenu(`[Menu](https://developer.android.com/reference/android/view/Menu.html)` arg0) `                                                                                                                                                                                                                                         | | ` void`                                                                                              | ` onRequestPermissionsResult(int arg0, String[] arg1, int[] arg2) `                                                                                                                                                                                                                                                                             | | ` void`                                                                                              | ` onResume() `                                                                                                                                                                                                                                                                                                                                  | | ` void`                                                                                              | ` onSaveInstanceState(`[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg0) `                                                                                                                                                                                                                                        | | ` void`                                                                                              | ` onStart() `                                                                                                                                                                                                                                                                                                                                   | | ` void`                                                                                              | ` onStop() `                                                                                                                                                                                                                                                                                                                                    | | ` void`                                                                                              | ` onTrimMemory(int arg0) `                                                                                                                                                                                                                                                                                                                      | | ` void`                                                                                              | ` onViewCreated(`[View](https://developer.android.com/reference/android/view/View.html)` arg0, `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg1) `                                                                                                                                                               | | ` void`                                                                                              | ` onViewStateRestored(`[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg0) `                                                                                                                                                                                                                                        | | ` void`                                                                                              | ` postponeEnterTransition() `                                                                                                                                                                                                                                                                                                                   | | ` void`                                                                                              | ` registerForContextMenu(`[View](https://developer.android.com/reference/android/view/View.html)` arg0) `                                                                                                                                                                                                                                       | | ` final void`                                                                                        | ` requestPermissions(String[] arg0, int arg1) `                                                                                                                                                                                                                                                                                                 | | ` void`                                                                                              | ` setAllowEnterTransitionOverlap(boolean arg0) `                                                                                                                                                                                                                                                                                                | | ` void`                                                                                              | ` setAllowReturnTransitionOverlap(boolean arg0) `                                                                                                                                                                                                                                                                                               | | ` void`                                                                                              | ` setArguments(`[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg0) `                                                                                                                                                                                                                                               | | ` void`                                                                                              | ` setEnterSharedElementCallback(`[SharedElementCallback](https://developer.android.com/reference/android/app/SharedElementCallback.html)` arg0) `                                                                                                                                                                                               | | ` void`                                                                                              | ` setEnterTransition(`[Transition](https://developer.android.com/reference/android/transition/Transition.html)` arg0) `                                                                                                                                                                                                                         | | ` void`                                                                                              | ` setExitSharedElementCallback(`[SharedElementCallback](https://developer.android.com/reference/android/app/SharedElementCallback.html)` arg0) `                                                                                                                                                                                                | | ` void`                                                                                              | ` setExitTransition(`[Transition](https://developer.android.com/reference/android/transition/Transition.html)` arg0) `                                                                                                                                                                                                                          | | ` void`                                                                                              | ` setHasOptionsMenu(boolean arg0) `                                                                                                                                                                                                                                                                                                             | | ` void`                                                                                              | ` setInitialSavedState(`[Fragment.SavedState](https://developer.android.com/reference/android/app/Fragment.SavedState.html)` arg0) `                                                                                                                                                                                                            | | ` void`                                                                                              | ` setMenuVisibility(boolean arg0) `                                                                                                                                                                                                                                                                                                             | | ` void`                                                                                              | ` setReenterTransition(`[Transition](https://developer.android.com/reference/android/transition/Transition.html)` arg0) `                                                                                                                                                                                                                       | | ` void`                                                                                              | ` setRetainInstance(boolean arg0) `                                                                                                                                                                                                                                                                                                             | | ` void`                                                                                              | ` setReturnTransition(`[Transition](https://developer.android.com/reference/android/transition/Transition.html)` arg0) `                                                                                                                                                                                                                        | | ` void`                                                                                              | ` setSharedElementEnterTransition(`[Transition](https://developer.android.com/reference/android/transition/Transition.html)` arg0) `                                                                                                                                                                                                            | | ` void`                                                                                              | ` setSharedElementReturnTransition(`[Transition](https://developer.android.com/reference/android/transition/Transition.html)` arg0) `                                                                                                                                                                                                           | | ` void`                                                                                              | ` setTargetFragment(`[Fragment](https://developer.android.com/reference/android/app/Fragment.html)` arg0, int arg1) `                                                                                                                                                                                                                           | | ` void`                                                                                              | ` setUserVisibleHint(boolean arg0) `                                                                                                                                                                                                                                                                                                            | | ` boolean`                                                                                           | ` shouldShowRequestPermissionRationale(String arg0) `                                                                                                                                                                                                                                                                                           | | ` void`                                                                                              | ` startActivity(`[Intent](https://developer.android.com/reference/android/content/Intent.html)` arg0) `                                                                                                                                                                                                                                         | | ` void`                                                                                              | ` startActivity(`[Intent](https://developer.android.com/reference/android/content/Intent.html)` arg0, `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg1) `                                                                                                                                                        | | ` void`                                                                                              | ` startActivityForResult(`[Intent](https://developer.android.com/reference/android/content/Intent.html)` arg0, int arg1) `                                                                                                                                                                                                                      | | ` void`                                                                                              | ` startActivityForResult(`[Intent](https://developer.android.com/reference/android/content/Intent.html)` arg0, int arg1, `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg2) `                                                                                                                                     | | ` void`                                                                                              | ` startIntentSenderForResult(`[IntentSender](https://developer.android.com/reference/android/content/IntentSender.html)` arg0, int arg1, `[Intent](https://developer.android.com/reference/android/content/Intent.html)` arg2, int arg3, int arg4, int arg5, `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg6) ` | | ` void`                                                                                              | ` startPostponedEnterTransition() `                                                                                                                                                                                                                                                                                                             | | ` String`                                                                                            | ` toString() `                                                                                                                                                                                                                                                                                                                                  | | ` void`                                                                                              | ` unregisterForContextMenu(`[View](https://developer.android.com/reference/android/view/View.html)` arg0) `                                                                                                                                                                                                                                     | ||
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#)From class` java.lang.Object ` |-------------------|-------------------------------| | ` Object`         | ` clone() `                   | | ` boolean`        | ` equals(Object arg0) `       | | ` void`           | ` finalize() `                | | ` final Class<?>` | ` getClass() `                | | ` int`            | ` hashCode() `                | | ` final void`     | ` notify() `                  | | ` final void`     | ` notifyAll() `               | | ` String`         | ` toString() `                | | ` final void`     | ` wait(long arg0, int arg1) ` | | ` final void`     | ` wait(long arg0) `           | | ` final void`     | ` wait() `                    | ||
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#)From interface` `[android.content.ComponentCallbacks2](https://developer.android.com/reference/android/content/ComponentCallbacks2.html)` ` |------------------|----------------------------| | ` abstract void` | ` onTrimMemory(int arg0) ` | ||
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#)From interface` `[android.view.View.OnCreateContextMenuListener](https://developer.android.com/reference/android/view/View.OnCreateContextMenuListener.html)` ` |------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` abstract void` | ` onCreateContextMenu(`[ContextMenu](https://developer.android.com/reference/android/view/ContextMenu.html)` arg0, `[View](https://developer.android.com/reference/android/view/View.html)` arg1, `[ContextMenu.ContextMenuInfo](https://developer.android.com/reference/android/view/ContextMenu.ContextMenuInfo.html)` arg2) ` | ||
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#)From interface` `[android.content.ComponentCallbacks](https://developer.android.com/reference/android/content/ComponentCallbacks.html)` ` |------------------|------------------------------------------------------------------------------------------------------------------------------------| | ` abstract void` | ` onConfigurationChanged(`[Configuration](https://developer.android.com/reference/android/content/res/Configuration.html)` arg0) ` | | ` abstract void` | ` onLowMemory() `                                                                                                                  | ||

## XML attributes

### LeanbackOnboardingTheme_onboardingDescriptionStyle

<br />

<br />

### LeanbackOnboardingTheme_onboardingHeaderStyle

<br />

<br />

### LeanbackOnboardingTheme_onboardingLogoStyle

<br />

<br />

### LeanbackOnboardingTheme_onboardingNavigatorContainerStyle

<br />

<br />

### LeanbackOnboardingTheme_onboardingPageIndicatorStyle

<br />

<br />

### LeanbackOnboardingTheme_onboardingStartButtonStyle

<br />

<br />

### LeanbackOnboardingTheme_onboardingTheme

<br />

<br />

### LeanbackOnboardingTheme_onboardingTitleStyle

<br />

<br />

## Public constructors

### OnboardingFragment

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
OnboardingFragment ()
```

<br />

<br />

## Public methods

### getArrowBackgroundColor

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getArrowBackgroundColor ()
```

Returns the background color of the arrow if it's set through[setArrowBackgroundColor(int)](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#setArrowBackgroundColor(int)). If no color was set, transparent is returned.

<br />

|    Returns    ||
|-------|--------|
| `int` | <br /> |

### getArrowColor

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getArrowColor ()
```

Returns the color of the arrow if it's set through[setArrowColor(int)](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#setArrowColor(int)). If no color was set, transparent is returned.

<br />

|    Returns    ||
|-------|--------|
| `int` | <br /> |

### getDescriptionViewTextColor

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getDescriptionViewTextColor ()
```

Returns the text color of DescriptionView if it's set through[setDescriptionViewTextColor(int)](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#setDescriptionViewTextColor(int)). If no color was set, transparent is returned.

<br />

|    Returns    ||
|-------|--------|
| `int` | <br /> |

### getDotBackgroundColor

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getDotBackgroundColor ()
```

Returns the background color of the dot if it's set through[setDotBackgroundColor(int)](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#setDotBackgroundColor(int)). If no color was set, transparent is returned.

<br />

|    Returns    ||
|-------|--------|
| `int` | <br /> |

### getIconResourceId

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getIconResourceId ()
```

Returns the resource id of the main icon.

<br />

|    Returns    ||
|-------|--------|
| `int` | <br /> |

### getLogoResourceId

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getLogoResourceId ()
```

Returns the resource ID of the splash logo image.

<br />

|                         Returns                         ||
|-------|--------------------------------------------------|
| `int` | The resource ID of the splash logo image. <br /> |

### getStartButtonText

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
CharSequence getStartButtonText ()
```

Returns the start button text if it's set through[setStartButtonText(CharSequence)](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#setStartButtonText(java.lang.CharSequence))}. If no string was set, null is returned.

<br />

|        Returns         ||
|----------------|--------|
| `CharSequence` | <br /> |

### getTitleViewTextColor

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getTitleViewTextColor ()
```

Returns the text color of TitleView if it's set through[setTitleViewTextColor(int)](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#setTitleViewTextColor(int)). If no color was set, transparent is returned.

<br />

|    Returns    ||
|-------|--------|
| `int` | <br /> |

### onCreateView

```
View onCreateView (LayoutInflater inflater, 
                ViewGroup container, 
                Bundle savedInstanceState)
```

<br />

<br />

|                  Parameters                   ||
|----------------------|-------------------------|
| `inflater`           | `LayoutInflater` <br /> |
| `container`          | `ViewGroup` <br />      |
| `savedInstanceState` | `Bundle` <br />         |

|                                    Returns                                     ||
|------------------------------------------------------------------------|--------|
| [View](https://developer.android.com/reference/android/view/View.html) | <br /> |

### onProvideTheme

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int onProvideTheme ()
```

Returns the theme used for styling the fragment. The default returns -1, indicating that the host Activity's theme should be used.

<br />

|                                                      Returns                                                      ||
|-------|------------------------------------------------------------------------------------------------------------|
| `int` | The theme resource ID of the theme to use in this fragment, or -1 to use the host Activity's theme. <br /> |

### onSaveInstanceState

```
void onSaveInstanceState (Bundle outState)
```

<br />

<br />

|         Parameters          ||
|------------|-----------------|
| `outState` | `Bundle` <br /> |

### onViewCreated

```
void onViewCreated (View view, 
                Bundle savedInstanceState)
```

<br />

<br />

|              Parameters               ||
|----------------------|-----------------|
| `view`               | `View` <br />   |
| `savedInstanceState` | `Bundle` <br /> |

### setArrowBackgroundColor

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setArrowBackgroundColor (int color)
```

Sets the background color of the arrow. If not set, the default color from attr[PagingIndicator_arrowBgColor](https://developer.android.com/reference/android/support/v17/leanback/R.styleable#PagingIndicator_arrowBgColor)in the theme will be used.

<br />

|                          Parameters                          ||
|---------|-----------------------------------------------------|
| `color` | `int`: the color to use for arrow background <br /> |

### setArrowColor

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setArrowColor (int color)
```

Sets the color of the arrow. This color will supersede the color set in the theme attribute[PagingIndicator_arrowColor](https://developer.android.com/reference/android/support/v17/leanback/R.styleable#PagingIndicator_arrowColor)if provided. If none of these two are set, the arrow will have its original bitmap color.

<br />

|                          Parameters                          ||
|---------|-----------------------------------------------------|
| `color` | `int`: the color to use for arrow background <br /> |

### setDescriptionViewTextColor

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setDescriptionViewTextColor (int color)
```

Sets the text color for DescriptionView. If not set, the default textColor set in style referenced by attr[onboardingDescriptionStyle](https://developer.android.com/reference/android/support/v17/leanback/R.attr#onboardingDescriptionStyle)will be used.

<br />

|                                  Parameters                                   ||
|---------|----------------------------------------------------------------------|
| `color` | `int`: the color to use as the text color for DescriptionView <br /> |

### setDotBackgroundColor

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setDotBackgroundColor (int color)
```

Sets the background color of the dots. If not set, the default color from attr[PagingIndicator_dotBgColor](https://developer.android.com/reference/android/support/v17/leanback/R.styleable#PagingIndicator_dotBgColor)in the theme will be used.

<br />

|                         Parameters                          ||
|---------|----------------------------------------------------|
| `color` | `int`: the color to use for dot backgrounds <br /> |

### setIconResouceId

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setIconResouceId (int resourceId)
```

Sets the resource id for the main icon.

<br />

|         Parameters         ||
|--------------|--------------|
| `resourceId` | `int` <br /> |

### setLogoResourceId

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setLogoResourceId (int id)
```

Sets the resource ID of the splash logo image. If the logo resource id set, the default logo splash animation will be played.

<br />

|                       Parameters                       ||
|------|--------------------------------------------------|
| `id` | `int`: The resource ID of the logo image. <br /> |

### setStartButtonText

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setStartButtonText (CharSequence text)
```

Sets the text on the start button text. If not set, the default text set in[LeanbackOnboardingTheme_onboardingStartButtonStyle](https://developer.android.com/reference/android/support/v17/leanback/R.styleable#LeanbackOnboardingTheme_onboardingStartButtonStyle)will be used.

<br />

|                      Parameters                      ||
|--------|----------------------------------------------|
| `text` | `CharSequence`: the start button text <br /> |

### setTitleViewTextColor

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setTitleViewTextColor (int color)
```

Sets the text color for TitleView. If not set, the default textColor set in style referenced by attr[onboardingTitleStyle](https://developer.android.com/reference/android/support/v17/leanback/R.attr#onboardingTitleStyle)will be used.

<br />

|                               Parameters                                ||
|---------|----------------------------------------------------------------|
| `color` | `int`: the color to use as the text color for TitleView <br /> |

## Protected methods

### getCurrentPageIndex

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getCurrentPageIndex ()
```

Returns the index of the current page.

<br />

|                   Returns                    ||
|-------|---------------------------------------|
| `int` | The index of the current page. <br /> |

### getPageCount

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getPageCount ()
```

Returns the page count.

<br />

|            Returns            ||
|-------|------------------------|
| `int` | The page count. <br /> |

### getPageDescription

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
CharSequence getPageDescription (int pageIndex)
```

Returns the description of the given page.

<br />

|                 Parameters                 ||
|-------------|-------------------------------|
| `pageIndex` | `int`: The page index. <br /> |

|                       Returns                       ||
|----------------|-------------------------------------|
| `CharSequence` | The description of the page. <br /> |

### getPageTitle

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
CharSequence getPageTitle (int pageIndex)
```

Returns the title of the given page.

<br />

|                 Parameters                 ||
|-------------|-------------------------------|
| `pageIndex` | `int`: The page index. <br /> |

|                    Returns                    ||
|----------------|-------------------------------|
| `CharSequence` | The title of the page. <br /> |

### isLogoAnimationFinished

added in[version 25.4.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
boolean isLogoAnimationFinished ()
```

Returns whether the logo enter animation is finished.

<br />

|                                      Returns                                      ||
|-----------|------------------------------------------------------------------------|
| `boolean` | `true`if the logo enter transition is finished,`false`otherwise <br /> |

### moveToNextPage

added in[version 25.4.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void moveToNextPage ()
```

Navigates to the next page.

<br />

### moveToPreviousPage

added in[version 25.4.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void moveToPreviousPage ()
```

Navigates to the previous page.

<br />

### onCreateBackgroundView

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
View onCreateBackgroundView (LayoutInflater inflater, 
                ViewGroup container)
```

Called to have the inherited class create background view. This is optional and the fragment which doesn't have the background view can return`null`. This is called inside[onCreateView(LayoutInflater, ViewGroup, Bundle)](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle)).

<br />

|                                                                 Parameters                                                                 ||
|-------------|-------------------------------------------------------------------------------------------------------------------------------|
| `inflater`  | `LayoutInflater`: The LayoutInflater object that can be used to inflate the views, <br />                                     |
| `container` | `ViewGroup`: The parent view that the additional views are attached to.The fragment should not add the view by itself. <br /> |

|                                                                 Returns                                                                 ||
|------------------------------------------------------------------------|-----------------------------------------------------------------|
| [View](https://developer.android.com/reference/android/view/View.html) | The background view for the onboarding screen, or`null`. <br /> |

### onCreateContentView

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
View onCreateContentView (LayoutInflater inflater, 
                ViewGroup container)
```

Called to have the inherited class create content view. This is optional and the fragment which doesn't have the content view can return`null`. This is called inside[onCreateView(LayoutInflater, ViewGroup, Bundle)](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle)).

The content view would be located at the center of the screen.

<br />

|                                                                 Parameters                                                                 ||
|-------------|-------------------------------------------------------------------------------------------------------------------------------|
| `inflater`  | `LayoutInflater`: The LayoutInflater object that can be used to inflate the views, <br />                                     |
| `container` | `ViewGroup`: The parent view that the additional views are attached to.The fragment should not add the view by itself. <br /> |

|                                                               Returns                                                                ||
|------------------------------------------------------------------------|--------------------------------------------------------------|
| [View](https://developer.android.com/reference/android/view/View.html) | The content view for the onboarding screen, or`null`. <br /> |

### onCreateDescriptionAnimator

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
Animator onCreateDescriptionAnimator ()
```

Provides the entry animation for description view. This allows users to override the default fade and slide animation. Returning null will disable the animation.

<br />

|                                           Returns                                           ||
|-------------------------------------------------------------------------------------|--------|
| [Animator](https://developer.android.com/reference/android/animation/Animator.html) | <br /> |

### onCreateEnterAnimation

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
Animator onCreateEnterAnimation ()
```

Called to have the inherited class create its enter animation. The start animation runs after logo animation ends.

<br />

|                                                                                                            Returns                                                                                                            ||
|-------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------|
| [Animator](https://developer.android.com/reference/android/animation/Animator.html) | The[Animator](https://developer.android.com/reference/android/animation/Animator.html)object which runs the page enter animation. <br /> |

### onCreateForegroundView

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
View onCreateForegroundView (LayoutInflater inflater, 
                ViewGroup container)
```

Called to have the inherited class create foreground view. This is optional and the fragment which doesn't need the foreground view can return`null`. This is called inside[onCreateView(LayoutInflater, ViewGroup, Bundle)](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle)).

This foreground view would have the highest z-order.

<br />

|                                                                 Parameters                                                                 ||
|-------------|-------------------------------------------------------------------------------------------------------------------------------|
| `inflater`  | `LayoutInflater`: The LayoutInflater object that can be used to inflate the views, <br />                                     |
| `container` | `ViewGroup`: The parent view that the additional views are attached to.The fragment should not add the view by itself. <br /> |

|                                                                 Returns                                                                 ||
|------------------------------------------------------------------------|-----------------------------------------------------------------|
| [View](https://developer.android.com/reference/android/view/View.html) | The foreground view for the onboarding screen, or`null`. <br /> |

### onCreateLogoAnimation

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
Animator onCreateLogoAnimation ()
```

Called to have the inherited class create its own logo animation.

This is called only if the logo image resource ID is not set by[setLogoResourceId(int)](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment#setLogoResourceId(int)). If this returns`null`, the logo animation is skipped.

<br />

|                                                                                                         Returns                                                                                                         ||
|-------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------|
| [Animator](https://developer.android.com/reference/android/animation/Animator.html) | The[Animator](https://developer.android.com/reference/android/animation/Animator.html)object which runs the logo animation. <br /> |

### onCreateTitleAnimator

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
Animator onCreateTitleAnimator ()
```

Provides the entry animation for title view. This allows users to override the default fade and slide animation. Returning null will disable the animation.

<br />

|                                           Returns                                           ||
|-------------------------------------------------------------------------------------|--------|
| [Animator](https://developer.android.com/reference/android/animation/Animator.html) | <br /> |

### onFinishFragment

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void onFinishFragment ()
```

Called when the onboarding flow finishes.

<br />

### onLogoAnimationFinished

added in[version 25.4.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void onLogoAnimationFinished ()
```

Called immediately after the logo animation is complete or no logo animation is specified. This method can also be called when the activity is recreated, i.e. when no logo animation are performed. By default, this method will hide the logo view and start the entrance animation for this fragment. Overriding subclasses can provide their own data loading logic as to when the entrance animation should be executed.

<br />

### onPageChanged

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void onPageChanged (int newPage, 
                int previousPage)
```

Called when the page has been changed.

<br />

|                    Parameters                    ||
|----------------|----------------------------------|
| `newPage`      | `int`: The new page. <br />      |
| `previousPage` | `int`: The previous page. <br /> |

### startEnterAnimation

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void startEnterAnimation (boolean force)
```

Called to start entrance transition. This can be called by subclasses when the logo animation and data loading is complete. If force flag is set to false, it will only start the animation if it's not already done yet. Otherwise, it will always start the enter animation. In both cases, the logo view will hide and the rest of fragment views become visible after this call.

<br />

|                                                                Parameters                                                                ||
|---------|---------------------------------------------------------------------------------------------------------------------------------|
| `force` | `boolean`:`true`if enter animation has to be performed regardless of whether it's been done in the past,`false`otherwise <br /> |

-

  ## Interfaces

  - [BrowseFragment.FragmentHost](https://developer.android.com/reference/android/support/v17/leanback/app/BrowseFragment.FragmentHost)
  - [BrowseFragment.MainFragmentAdapterProvider](https://developer.android.com/reference/android/support/v17/leanback/app/BrowseFragment.MainFragmentAdapterProvider)
  - [BrowseFragment.MainFragmentRowsAdapterProvider](https://developer.android.com/reference/android/support/v17/leanback/app/BrowseFragment.MainFragmentRowsAdapterProvider)
  - [BrowseSupportFragment.FragmentHost](https://developer.android.com/reference/android/support/v17/leanback/app/BrowseSupportFragment.FragmentHost)
  - [BrowseSupportFragment.MainFragmentAdapterProvider](https://developer.android.com/reference/android/support/v17/leanback/app/BrowseSupportFragment.MainFragmentAdapterProvider)
  - [BrowseSupportFragment.MainFragmentRowsAdapterProvider](https://developer.android.com/reference/android/support/v17/leanback/app/BrowseSupportFragment.MainFragmentRowsAdapterProvider)
  - [HeadersFragment.OnHeaderClickedListener](https://developer.android.com/reference/android/support/v17/leanback/app/HeadersFragment.OnHeaderClickedListener)
  - [HeadersFragment.OnHeaderViewSelectedListener](https://developer.android.com/reference/android/support/v17/leanback/app/HeadersFragment.OnHeaderViewSelectedListener)
  - [HeadersSupportFragment.OnHeaderClickedListener](https://developer.android.com/reference/android/support/v17/leanback/app/HeadersSupportFragment.OnHeaderClickedListener)
  - [HeadersSupportFragment.OnHeaderViewSelectedListener](https://developer.android.com/reference/android/support/v17/leanback/app/HeadersSupportFragment.OnHeaderViewSelectedListener)
  - [SearchFragment.SearchResultProvider](https://developer.android.com/reference/android/support/v17/leanback/app/SearchFragment.SearchResultProvider)
  - [SearchSupportFragment.SearchResultProvider](https://developer.android.com/reference/android/support/v17/leanback/app/SearchSupportFragment.SearchResultProvider)
-

  ## Classes

  - [BackgroundManager](https://developer.android.com/reference/android/support/v17/leanback/app/BackgroundManager)
  - [BaseFragment](https://developer.android.com/reference/android/support/v17/leanback/app/BaseFragment)
  - [BaseSupportFragment](https://developer.android.com/reference/android/support/v17/leanback/app/BaseSupportFragment)
  - [BrandedFragment](https://developer.android.com/reference/android/support/v17/leanback/app/BrandedFragment)
  - [BrandedSupportFragment](https://developer.android.com/reference/android/support/v17/leanback/app/BrandedSupportFragment)
  - [BrowseFragment](https://developer.android.com/reference/android/support/v17/leanback/app/BrowseFragment)
  - [BrowseFragment.BrowseTransitionListener](https://developer.android.com/reference/android/support/v17/leanback/app/BrowseFragment.BrowseTransitionListener)
  - [BrowseFragment.FragmentFactory](https://developer.android.com/reference/android/support/v17/leanback/app/BrowseFragment.FragmentFactory)
  - [BrowseFragment.ListRowFragmentFactory](https://developer.android.com/reference/android/support/v17/leanback/app/BrowseFragment.ListRowFragmentFactory)
  - [BrowseFragment.MainFragmentAdapter](https://developer.android.com/reference/android/support/v17/leanback/app/BrowseFragment.MainFragmentAdapter)
  - [BrowseFragment.MainFragmentAdapterRegistry](https://developer.android.com/reference/android/support/v17/leanback/app/BrowseFragment.MainFragmentAdapterRegistry)
  - [BrowseFragment.MainFragmentRowsAdapter](https://developer.android.com/reference/android/support/v17/leanback/app/BrowseFragment.MainFragmentRowsAdapter)
  - [BrowseSupportFragment](https://developer.android.com/reference/android/support/v17/leanback/app/BrowseSupportFragment)
  - [BrowseSupportFragment.BrowseTransitionListener](https://developer.android.com/reference/android/support/v17/leanback/app/BrowseSupportFragment.BrowseTransitionListener)
  - [BrowseSupportFragment.FragmentFactory](https://developer.android.com/reference/android/support/v17/leanback/app/BrowseSupportFragment.FragmentFactory)
  - [BrowseSupportFragment.ListRowFragmentFactory](https://developer.android.com/reference/android/support/v17/leanback/app/BrowseSupportFragment.ListRowFragmentFactory)
  - [BrowseSupportFragment.MainFragmentAdapter](https://developer.android.com/reference/android/support/v17/leanback/app/BrowseSupportFragment.MainFragmentAdapter)
  - [BrowseSupportFragment.MainFragmentAdapterRegistry](https://developer.android.com/reference/android/support/v17/leanback/app/BrowseSupportFragment.MainFragmentAdapterRegistry)
  - [BrowseSupportFragment.MainFragmentRowsAdapter](https://developer.android.com/reference/android/support/v17/leanback/app/BrowseSupportFragment.MainFragmentRowsAdapter)
  - [DetailsFragment](https://developer.android.com/reference/android/support/v17/leanback/app/DetailsFragment)
  - [DetailsFragmentBackgroundController](https://developer.android.com/reference/android/support/v17/leanback/app/DetailsFragmentBackgroundController)
  - [DetailsSupportFragment](https://developer.android.com/reference/android/support/v17/leanback/app/DetailsSupportFragment)
  - [DetailsSupportFragmentBackgroundController](https://developer.android.com/reference/android/support/v17/leanback/app/DetailsSupportFragmentBackgroundController)
  - [ErrorFragment](https://developer.android.com/reference/android/support/v17/leanback/app/ErrorFragment)
  - [ErrorSupportFragment](https://developer.android.com/reference/android/support/v17/leanback/app/ErrorSupportFragment)
  - [GuidedStepFragment](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment)
  - [GuidedStepSupportFragment](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepSupportFragment)
  - [HeadersFragment](https://developer.android.com/reference/android/support/v17/leanback/app/HeadersFragment)
  - [HeadersSupportFragment](https://developer.android.com/reference/android/support/v17/leanback/app/HeadersSupportFragment)
  - [OnboardingFragment](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment)
  - [OnboardingSupportFragment](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingSupportFragment)
  - [PlaybackFragment](https://developer.android.com/reference/android/support/v17/leanback/app/PlaybackFragment)
  - [PlaybackFragmentGlueHost](https://developer.android.com/reference/android/support/v17/leanback/app/PlaybackFragmentGlueHost)
  - [PlaybackSupportFragment](https://developer.android.com/reference/android/support/v17/leanback/app/PlaybackSupportFragment)
  - [PlaybackSupportFragmentGlueHost](https://developer.android.com/reference/android/support/v17/leanback/app/PlaybackSupportFragmentGlueHost)
  - [ProgressBarManager](https://developer.android.com/reference/android/support/v17/leanback/app/ProgressBarManager)
  - [RowsFragment](https://developer.android.com/reference/android/support/v17/leanback/app/RowsFragment)
  - [RowsFragment.MainFragmentAdapter](https://developer.android.com/reference/android/support/v17/leanback/app/RowsFragment.MainFragmentAdapter)
  - [RowsFragment.MainFragmentRowsAdapter](https://developer.android.com/reference/android/support/v17/leanback/app/RowsFragment.MainFragmentRowsAdapter)
  - [RowsSupportFragment](https://developer.android.com/reference/android/support/v17/leanback/app/RowsSupportFragment)
  - [RowsSupportFragment.MainFragmentAdapter](https://developer.android.com/reference/android/support/v17/leanback/app/RowsSupportFragment.MainFragmentAdapter)
  - [RowsSupportFragment.MainFragmentRowsAdapter](https://developer.android.com/reference/android/support/v17/leanback/app/RowsSupportFragment.MainFragmentRowsAdapter)
  - [SearchFragment](https://developer.android.com/reference/android/support/v17/leanback/app/SearchFragment)
  - [SearchSupportFragment](https://developer.android.com/reference/android/support/v17/leanback/app/SearchSupportFragment)
  - [VerticalGridFragment](https://developer.android.com/reference/android/support/v17/leanback/app/VerticalGridFragment)
  - [VerticalGridSupportFragment](https://developer.android.com/reference/android/support/v17/leanback/app/VerticalGridSupportFragment)
  - [VideoFragment](https://developer.android.com/reference/android/support/v17/leanback/app/VideoFragment)
  - [VideoFragmentGlueHost](https://developer.android.com/reference/android/support/v17/leanback/app/VideoFragmentGlueHost)
  - [VideoSupportFragment](https://developer.android.com/reference/android/support/v17/leanback/app/VideoSupportFragment)
  - [VideoSupportFragmentGlueHost](https://developer.android.com/reference/android/support/v17/leanback/app/VideoSupportFragmentGlueHost)