Class DynamicTutorialFragment
java.lang.Object
androidx.fragment.app.Fragment
com.pranavpandey.android.dynamic.support.fragment.DynamicFragment
com.pranavpandey.android.dynamic.support.tutorial.fragment.DynamicTutorialFragment
- All Implemented Interfaces:
ComponentCallbacks,SharedPreferences.OnSharedPreferenceChangeListener,View.OnCreateContextMenuListener,ActivityResultCaller,MenuProvider,HasDefaultViewModelProviderFactory,LifecycleOwner,ViewModelStoreOwner,androidx.savedstate.SavedStateRegistryOwner,ViewPager.OnPageChangeListener,DynamicLifecycle,DynamicSearchListener,DynamicTransitionListener,Tutorial<DynamicTutorial,,DynamicTutorialFragment> DynamicProductFlavor
public class DynamicTutorialFragment
extends DynamicFragment
implements Tutorial<DynamicTutorial,DynamicTutorialFragment>
A
DynamicTutorialFragment with an image, title, subtitle and description that
will be used with the DynamicTutorialActivity.-
Nested Class Summary
Nested classes/interfaces inherited from class androidx.fragment.app.Fragment
Fragment.InstantiationException, Fragment.SavedStateNested classes/interfaces inherited from interface com.pranavpandey.android.dynamic.support.tutorial.Tutorial
Tutorial.Motion<T,V> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringFragment argument key to set the dynamic tutorial.static final StringTutorial key to maintain its state.Fields inherited from class androidx.fragment.app.Fragment
mPreviousWhoFields inherited from interface com.pranavpandey.android.dynamic.support.tutorial.Tutorial
ADS_NAME_TUTORIAL, ADS_NAME_TUTORIAL_IMAGE, ADS_NAME_TUTORIAL_SUBTITLE, ADS_NAME_TUTORIAL_TITLE, ADS_TUTORIAL_WELCOME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the tutorial view or fragment.Returns the card view of this fragment.intgetColor()Returns the color used by this tutorial.Returns the text view to show the tutorial description.Returns the enter transition used by his listener.Returns the exit transition used by his listener.Returns the image view to show the tutorial image.Returns the root view of this fragment.Returns the scroll view to show the scrolling content.Returns the text view to show the tutorial subtitle.intReturns the tint color used by this tutorial.Returns the text view to show the tutorial title.Returns the tutorial object.intReturns the id for this tutorial.static DynamicTutorialFragmentnewInstance(DynamicTutorial dynamicTutorial) Function to initialize this fragment.voidonColorChanged(int color, int tintColor) This method will be called when there is a change in the colors of the activity.voidonCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) voidonPageScrolled(int position, float positionOffset, int positionOffsetPixels) voidonPageScrollStateChanged(int state) voidonPageSelected(int position) voidonSaveInstanceState(Bundle outState) voidonSetPadding(int left, int top, int right, int bottom) This method will be called on setting the padding of the tutorial.voidonViewCreated(View view, Bundle savedInstanceState) Methods inherited from class com.pranavpandey.android.dynamic.support.fragment.DynamicFragment
finishActivity, getBooleanFromArguments, getCheckedMenuItemId, getDynamicActivity, getDynamicReenterTransition, getDynamicReturnTransition, getHostMenu, getIntFromArguments, getNavigationViewId, getParcelableFromArguments, getPostponeTransitionView, getProductFlavor, getSavedInstanceState, getStringFromArguments, getStringFromArguments, getSubtitle, getSystemActivity, getTextWatcher, getTitle, invalidateHostMenu, isAppCompatActivity, isEnableMenu, isForceMenuIcons, isHasMenuProvider, isOnSharedPreferenceChangeListener, isSearchViewExpanded, isSearchViewListenerListener, isSupportActionBar, onAddActivityHeader, onAddMenuProvider, onAdjustEnterReturnTransition, onAdjustExitReenterTransition, onApplyTransitions, onCreateMenu, onDestroy, onDynamicPause, onDynamicResume, onFindView, onMenuClosed, onMenuItemSelected, onPause, onPrepareMenu, onRemoveProvider, onResume, onSearchViewCollapsed, onSearchViewExpanded, onSharedPreferenceChanged, onStart, onStartActivityException, postponeEnterTransition, setHasOptionsMenu, setHostMenuItemVisible, setMenuVisibility, setResult, setResult, setResult, setResult, startActivity, startActivity, startActivityForResult, startActivityForResult, startMotionActivity, startMotionActivityForResult, startPostponedEnterTransitionMethods inherited from class androidx.fragment.app.Fragment
dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getContext, getDefaultViewModelCreationExtras, getDefaultViewModelProviderFactory, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, getLayoutInflater, getLayoutInflater, getLifecycle, getLoaderManager, getParentFragment, getParentFragmentManager, getReenterTransition, getResources, getRetainInstance, getReturnTransition, getSavedStateRegistry, getSharedElementEnterTransition, getSharedElementReturnTransition, getString, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, getViewLifecycleOwner, getViewLifecycleOwnerLiveData, getViewModelStore, hashCode, hasOptionsMenu, instantiate, instantiate, isAdded, isDetached, isHidden, isInLayout, isMenuVisible, isRemoving, isResumed, isStateSaved, isVisible, onActivityCreated, onActivityResult, onAttach, onAttach, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreateAnimation, onCreateAnimator, onCreateContextMenu, onCreateOptionsMenu, onDestroyOptionsMenu, onDestroyView, onDetach, onGetLayoutInflater, onHiddenChanged, onInflate, onInflate, onLowMemory, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPictureInPictureModeChanged, onPrepareOptionsMenu, onPrimaryNavigationFragmentChanged, onRequestPermissionsResult, onStop, onViewStateRestored, postponeEnterTransition, registerForActivityResult, registerForActivityResult, registerForContextMenu, requestPermissions, requireActivity, requireArguments, requireContext, requireFragmentManager, requireHost, requireParentFragment, requireView, setAllowEnterTransitionOverlap, setAllowReturnTransitionOverlap, setArguments, setEnterSharedElementCallback, setEnterTransition, setExitSharedElementCallback, setExitTransition, setHasOptionsMenu, setInitialSavedState, setReenterTransition, setRetainInstance, setReturnTransition, setSharedElementEnterTransition, setSharedElementReturnTransition, setTargetFragment, setUserVisibleHint, shouldShowRequestPermissionRationale, startIntentSenderForResult, toString, unregisterForContextMenu
-
Field Details
-
ADS_ARGS_TUTORIAL
Fragment argument key to set the dynamic tutorial.- See Also:
-
ADS_STATE_TUTORIAL
Tutorial key to maintain its state.- See Also:
-
-
Constructor Details
-
DynamicTutorialFragment
public DynamicTutorialFragment()
-
-
Method Details
-
onCreate
- Overrides:
onCreatein classDynamicFragment
-
onCreateView
@Nullable public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) - Overrides:
onCreateViewin classFragment
-
onViewCreated
- Overrides:
onViewCreatedin classDynamicFragment
-
getDynamicEnterTransition
Description copied from interface:DynamicTransitionListenerReturns the enter transition used by his listener.- Specified by:
getDynamicEnterTransitionin interfaceDynamicTransitionListener- Overrides:
getDynamicEnterTransitionin classDynamicFragment- Returns:
- The enter transition used by his listener.
- See Also:
-
getDynamicExitTransition
Description copied from interface:DynamicTransitionListenerReturns the exit transition used by his listener.- Specified by:
getDynamicExitTransitionin interfaceDynamicTransitionListener- Overrides:
getDynamicExitTransitionin classDynamicFragment- Returns:
- The exit transition used by his listener.
- See Also:
-
onSaveInstanceState
- Overrides:
onSaveInstanceStatein classDynamicFragment
-
onPageScrolled
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) - Specified by:
onPageScrolledin interfaceViewPager.OnPageChangeListener
-
onPageSelected
public void onPageSelected(int position) - Specified by:
onPageSelectedin interfaceViewPager.OnPageChangeListener
-
onPageScrollStateChanged
public void onPageScrollStateChanged(int state) - Specified by:
onPageScrollStateChangedin interfaceViewPager.OnPageChangeListener
-
getTutorialId
public int getTutorialId()Description copied from interface:TutorialReturns the id for this tutorial.- Specified by:
getTutorialIdin interfaceTutorial<DynamicTutorial,DynamicTutorialFragment> - Returns:
- The id of this tutorial.
-
getTutorial
Description copied from interface:TutorialReturns the tutorial object.- Specified by:
getTutorialin interfaceTutorial<DynamicTutorial,DynamicTutorialFragment> - Returns:
- The tutorial object.
-
createTutorial
Description copied from interface:TutorialReturns the tutorial view or fragment.- Specified by:
createTutorialin interfaceTutorial<DynamicTutorial,DynamicTutorialFragment> - Returns:
- The tutorial view or fragment.
-
getColor
Description copied from interface:TutorialReturns the color used by this tutorial.- Specified by:
getColorin interfaceTutorial<DynamicTutorial,DynamicTutorialFragment> - Returns:
- The color used by this tutorial.
-
getTintColor
Description copied from interface:TutorialReturns the tint color used by this tutorial.- Specified by:
getTintColorin interfaceTutorial<DynamicTutorial,DynamicTutorialFragment> - Returns:
- The tint color used by this tutorial.
-
onColorChanged
Description copied from interface:TutorialThis method will be called when there is a change in the colors of the activity.Implement this method to update any views during the transition.
- Specified by:
onColorChangedin interfaceTutorial<DynamicTutorial,DynamicTutorialFragment> - Parameters:
color- The color used by the tutorial.tintColor- The tint color used by this tutorial.
-
onSetPadding
public void onSetPadding(int left, int top, int right, int bottom) Description copied from interface:TutorialThis method will be called on setting the padding of the tutorial.Implement this method to update any views according to the container.
- Specified by:
onSetPaddingin interfaceTutorial<DynamicTutorial,DynamicTutorialFragment> - Parameters:
left- The left padding supplied by the container.top- The top padding supplied by the container.right- The right padding supplied by the container.bottom- The bottom padding supplied by the container.
-
getRootView
Returns the root view of this fragment.- Returns:
- The root view of this fragment.
-
getImageView
Returns the image view to show the tutorial image.- Returns:
- The image view to show the tutorial image.
-
getScrollView
Returns the scroll view to show the scrolling content.- Returns:
- The scroll view to show the scrolling content.
-
getCardView
Returns the card view of this fragment.- Returns:
- The card view of this fragment.
-
getTitleView
Returns the text view to show the tutorial title.- Returns:
- The text view to show the tutorial title.
-
getSubtitleView
Returns the text view to show the tutorial subtitle.- Returns:
- The text view to show the tutorial subtitle.
-
getDescriptionView
Returns the text view to show the tutorial description.- Returns:
- The text view to show the tutorial description.