Onboarding Fragment Standard
When you use the Component API without the Android Support Library, the OnboardingFragmentStandard
displays important advice for correctly photographing a document.
Include the OnboardingFragmentStandard
into your layout either directly with <fragment>
in your Activity's layout or using the android.app.FragmentManager.
The default way of showing the Onboarding Screen is as an overlay above the camera preview with a semi-transparent background.
By default an empty last page is added to enable the revealing of the camera preview before the Onboarding Screen is dismissed.
If you would like to display a different number of pages, you can use the createInstance or createInstanceWithoutEmptyLastPage factory method and provide a list of OnboardingPage objects.
If you would like to disable the appending of the empty last page, you can use the createInstanceWithoutEmptyLastPage or the createInstanceWithoutEmptyLastPage factory method.
An OnboardingFragmentListener instance must be available until the OnboardingFragmentStandard
is attached to an activity. Failing to do so will throw an exception. The listener instance can be provided either implicitly by making the hosting Activity implement the OnboardingFragmentListener interface or explicitly by setting the listener using setListener.
Your Activity is automatically set as the listener in onCreate.
Customizing the Onboarding ScreenSee the OnboardingActivity for details.