public class OnboardingPage
extends java.lang.Object
The OnboardingPage
is used by the Onboarding Fragment to display an image and a short text.
Use this class to show a different number of pages in the Onboarding Screen. Customizing the default onboarding pages can be done via overriding of app resources.
When using the Screen API set an ArrayList
containing OnboardingPage
objects as the CameraActivity.EXTRA_IN_ONBOARDING_PAGES
when starting the CameraActivity
.
When using the Componenent API provide an ArrayList
containing OnboardingPage
objects as the argument for the Onboarding Fragment factory method OnboardingFragmentStandard.createInstance(ArrayList)
or OnboardingFragmentCompat.createInstance(ArrayList)
.
Constructor and Description |
---|
OnboardingPage(int textResId,
int imageResId)
Create a new onboarding page with the desired string resource and drawable resource.
|
Modifier and Type | Method and Description |
---|---|
int |
getImageResId() |
int |
getTextResId() |
public OnboardingPage(int textResId, int imageResId)
Create a new onboarding page with the desired string resource and drawable resource.
Note: the string should be a short sentence.
textResId
- a string resource id which will be shown in the onboarding pageimageResId
- a drawable resource id which will be shown in the onboarding page