OnboardingFragmentStandard

Component API

When you use the Component API without the Android Support Library, the {@code OnboardingFragmentStandard} displays important advice for correctly photographing a document.

Include the {@code OnboardingFragmentStandard} into your layout either directly with {@code } 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 or 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 or the createInstanceWithoutEmptyLastPage factory method.

An OnboardingFragmentListener instance must be available until the {@code 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 Screen

See the OnboardingActivity for details.

public class OnboardingFragmentStandard extends Fragment implements OnboardingFragmentImplCallback, OnboardingFragmentInterface

Functions

createInstance
Link copied to clipboard

Factory method for creating a new instance of the Fragment using the provided list of onboarding pages.

If you would like to prevent the appending of an empty page, you can use the factory method.

If you don't need a custom number of pages and wish to use the default behaviour, you can use the default constructor of OnboardingFragmentCompat .

createInstanceWithoutEmptyLastPage
Link copied to clipboard

Factory method for creating a new instance of the Fragment without appending an empty page to the default pages.

If you wish to use the default behaviour, you can use the default constructor of OnboardingFragmentCompat .

Factory method for creating a new instance of the Fragment using the provided list of onboarding pages.

This method prevents the appending of an empty page to your pages.

If you don't need a custom number of pages and wish to use the default behaviour, you can use the default constructor of OnboardingFragmentCompat .

dump
Link copied to clipboard
void dump(String prefix, FileDescriptor fd, PrintWriter writer, Array<Stringargs)
equals
Link copied to clipboard
final boolean equals(Object o)
getActivity
Link copied to clipboard
final Activity getActivity()
abstract Activity getActivity()
getAllowEnterTransitionOverlap
Link copied to clipboard
boolean getAllowEnterTransitionOverlap()
getAllowReturnTransitionOverlap
Link copied to clipboard
boolean getAllowReturnTransitionOverlap()
getArguments
Link copied to clipboard
final Bundle getArguments()
getChildFragmentManager
Link copied to clipboard
final FragmentManager getChildFragmentManager()
getContext
Link copied to clipboard
Context getContext()
getEnterTransition
Link copied to clipboard
Transition getEnterTransition()
getExitTransition
Link copied to clipboard
Transition getExitTransition()
getFragmentManager
Link copied to clipboard
final FragmentManager getFragmentManager()
getHost
Link copied to clipboard
final Object getHost()
getId
Link copied to clipboard
final int getId()
getLayoutInflater
Link copied to clipboard
final LayoutInflater getLayoutInflater()
getLoaderManager
Link copied to clipboard
LoaderManager getLoaderManager()
getParentFragment
Link copied to clipboard
final Fragment getParentFragment()
getReenterTransition
Link copied to clipboard
Transition getReenterTransition()
getResources
Link copied to clipboard
final Resources getResources()
getRetainInstance
Link copied to clipboard
final boolean getRetainInstance()
getReturnTransition
Link copied to clipboard
Transition getReturnTransition()
getSharedElementEnterTransition
Link copied to clipboard
Transition getSharedElementEnterTransition()
getSharedElementReturnTransition
Link copied to clipboard
Transition getSharedElementReturnTransition()
getString
Link copied to clipboard
final String getString(int resId)
getTag
Link copied to clipboard
final String getTag()
getTargetFragment
Link copied to clipboard
final Fragment getTargetFragment()
getTargetRequestCode
Link copied to clipboard
final int getTargetRequestCode()
getText
Link copied to clipboard
final CharSequence getText(int resId)
getUserVisibleHint
Link copied to clipboard
boolean getUserVisibleHint()
getView
Link copied to clipboard
View getView()
abstract View getView()
getViewPagerAdapter
Link copied to clipboard
abstract PagerAdapter getViewPagerAdapter(List<OnboardingPagepages)
PagerAdapter getViewPagerAdapter(List<OnboardingPagepages)
hashCode
Link copied to clipboard
final int hashCode()
instantiate
Link copied to clipboard
static Fragment instantiate(Context context, String fname)
isAdded
Link copied to clipboard
final boolean isAdded()
isDetached
Link copied to clipboard
final boolean isDetached()
isHidden
Link copied to clipboard
final boolean isHidden()
isInLayout
Link copied to clipboard
final boolean isInLayout()
isRemoving
Link copied to clipboard
final boolean isRemoving()
isResumed
Link copied to clipboard
final boolean isResumed()
isStateSaved
Link copied to clipboard
final boolean isStateSaved()
isVisible
Link copied to clipboard
final boolean isVisible()
onActivityCreated
Link copied to clipboard
void onActivityCreated(Bundle savedInstanceState)
onActivityResult
Link copied to clipboard
void onActivityResult(int requestCode, int resultCode, Intent data)
onAttach
Link copied to clipboard
void onAttach(Context context)
onAttachFragment
Link copied to clipboard
void onAttachFragment(Fragment childFragment)
onConfigurationChanged
Link copied to clipboard
void onConfigurationChanged(Configuration newConfig)
onContextItemSelected
Link copied to clipboard
boolean onContextItemSelected(MenuItem item)
onCreate
Link copied to clipboard
void onCreate(Bundle savedInstanceState)
void onCreate(Bundle savedInstanceState)
onCreateAnimator
Link copied to clipboard
Animator onCreateAnimator(int transit, boolean enter, int nextAnim)
onCreateContextMenu
Link copied to clipboard
onCreateOptionsMenu
Link copied to clipboard
void onCreateOptionsMenu(Menu menu, MenuInflater inflater)
onCreateView
Link copied to clipboard
onDestroy
Link copied to clipboard
void onDestroy()
onDestroyOptionsMenu
Link copied to clipboard
void onDestroyOptionsMenu()
onDestroyView
Link copied to clipboard
void onDestroyView()
onDetach
Link copied to clipboard
void onDetach()
onGetLayoutInflater
Link copied to clipboard
onHiddenChanged
Link copied to clipboard
void onHiddenChanged(boolean hidden)
onInflate
Link copied to clipboard
void onInflate(AttributeSet attrs, Bundle savedInstanceState)
onLowMemory
Link copied to clipboard
void onLowMemory()
onMultiWindowModeChanged
Link copied to clipboard
void onMultiWindowModeChanged(boolean isInMultiWindowMode, Configuration newConfig)
onOptionsItemSelected
Link copied to clipboard
boolean onOptionsItemSelected(MenuItem item)
onOptionsMenuClosed
Link copied to clipboard
void onOptionsMenuClosed(Menu menu)
onPause
Link copied to clipboard
void onPause()
onPictureInPictureModeChanged
Link copied to clipboard
onPrepareOptionsMenu
Link copied to clipboard
void onPrepareOptionsMenu(Menu menu)
onRequestPermissionsResult
Link copied to clipboard
void onRequestPermissionsResult(int requestCode, Array<Stringpermissions, Array<int> grantResults)
onResume
Link copied to clipboard
void onResume()
onSaveInstanceState
Link copied to clipboard
void onSaveInstanceState(Bundle outState)
onStart
Link copied to clipboard
void onStart()
onStop
Link copied to clipboard
void onStop()
onTrimMemory
Link copied to clipboard
void onTrimMemory(int level)
onViewCreated
Link copied to clipboard
void onViewCreated(View view, Bundle savedInstanceState)
onViewStateRestored
Link copied to clipboard
void onViewStateRestored(Bundle savedInstanceState)
postponeEnterTransition
Link copied to clipboard
void postponeEnterTransition()
registerForContextMenu
Link copied to clipboard
void registerForContextMenu(View view)
requestPermissions
Link copied to clipboard
final void requestPermissions(Array<Stringpermissions, int requestCode)
setAllowEnterTransitionOverlap
Link copied to clipboard
void setAllowEnterTransitionOverlap(boolean allow)
setAllowReturnTransitionOverlap
Link copied to clipboard
void setAllowReturnTransitionOverlap(boolean allow)
setArguments
Link copied to clipboard
void setArguments(Bundle args)
setEnterSharedElementCallback
Link copied to clipboard
setEnterTransition
Link copied to clipboard
void setEnterTransition(Transition transition)
setExitSharedElementCallback
Link copied to clipboard
void setExitSharedElementCallback(SharedElementCallback callback)
setExitTransition
Link copied to clipboard
void setExitTransition(Transition transition)
setHasOptionsMenu
Link copied to clipboard
void setHasOptionsMenu(boolean hasMenu)
setInitialSavedState
Link copied to clipboard
void setInitialSavedState(Fragment.SavedState state)
setListener
Link copied to clipboard

Set a listener for onboarding events.

By default the hosting Activity is expected to implement the OnboardingFragmentListener . In case that is not feasible you may set the listener using this method.

Note: the listener is expected to be available until the fragment is attached to an activity. Make sure to set the listener before that.

void setListener(OnboardingFragmentListener listener)
setMenuVisibility
Link copied to clipboard
void setMenuVisibility(boolean menuVisible)
setReenterTransition
Link copied to clipboard
void setReenterTransition(Transition transition)
setRetainInstance
Link copied to clipboard
void setRetainInstance(boolean retain)
setReturnTransition
Link copied to clipboard
void setReturnTransition(Transition transition)
setSharedElementEnterTransition
Link copied to clipboard
void setSharedElementEnterTransition(Transition transition)
setSharedElementReturnTransition
Link copied to clipboard
void setSharedElementReturnTransition(Transition transition)
setTargetFragment
Link copied to clipboard
void setTargetFragment(Fragment fragment, int requestCode)
setUserVisibleHint
Link copied to clipboard
void setUserVisibleHint(boolean isVisibleToUser)
shouldShowRequestPermissionRationale
Link copied to clipboard
boolean shouldShowRequestPermissionRationale(String permission)
startActivity
Link copied to clipboard
void startActivity(Intent intent)
abstract void startActivity(Intent intent)
startActivityForResult
Link copied to clipboard
void startActivityForResult(Intent intent, int requestCode)
abstract void startActivityForResult(Intent intent, int requestCode)
startIntentSenderForResult
Link copied to clipboard
startPostponedEnterTransition
Link copied to clipboard
void startPostponedEnterTransition()
toString
Link copied to clipboard
String toString()
unregisterForContextMenu
Link copied to clipboard
void unregisterForContextMenu(View view)