-
- All Implemented Interfaces:
-
android.arch.lifecycle.LifecycleOwner
,android.arch.lifecycle.ViewModelStoreOwner
,android.content.ComponentCallbacks
,android.view.View.OnCreateContextMenuListener
public abstract class PTRFragment extends Fragment
Base class for Pointr fragments
Handles the Pointr SDK related flow and safely calls the lifecycle method considering the Pointr SDKs lifecycle.
-
-
Field Summary
Fields Modifier and Type Field Description private final Integer
mState
private final Bundle
mSavedFragmentState
private final SparseArray<Parcelable>
mSavedViewState
private final Boolean
mSavedUserVisibleHint
private final Integer
mIndex
private final String
mWho
private final Bundle
mArguments
private final Fragment
mTarget
private final Integer
mTargetIndex
private final Integer
mTargetRequestCode
private final Boolean
mAdded
private final Boolean
mRemoving
private final Boolean
mFromLayout
private final Boolean
mInLayout
private final Boolean
mRestored
private final Boolean
mPerformedCreateView
private final Integer
mBackStackNesting
private final FragmentManagerImpl
mFragmentManager
private final FragmentHostCallback<Object>
mHost
private final FragmentManagerImpl
mChildFragmentManager
private final FragmentManagerNonConfig
mChildNonConfig
private final ViewModelStore
mViewModelStore
private final Fragment
mParentFragment
private final Integer
mFragmentId
private final Integer
mContainerId
private final String
mTag
private final Boolean
mHidden
private final Boolean
mDetached
private final Boolean
mRetainInstance
private final Boolean
mRetaining
private final Boolean
mHasMenu
private final Boolean
mMenuVisible
private final Boolean
mCalled
private final ViewGroup
mContainer
private final View
mView
private final View
mInnerView
private final Boolean
mDeferStart
private final Boolean
mUserVisibleHint
private final Fragment.AnimationInfo
mAnimationInfo
private final Boolean
mIsNewlyAdded
private final Boolean
mHiddenChanged
private final Float
mPostponedAlpha
private final LayoutInflater
mLayoutInflater
private final Boolean
mIsCreated
private final LifecycleRegistry
mLifecycleRegistry
private final LifecycleRegistry
mViewLifecycleRegistry
private final LifecycleOwner
mViewLifecycleOwner
private final MutableLiveData<LifecycleOwner>
mViewLifecycleOwnerLiveData
-
Constructor Summary
Constructors Constructor Description PTRFragment(Integer layoutResourceId)
-
Method Summary
Modifier and Type Method Description View
onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
Unit
onActivityCreated(Bundle savedInstanceState)
Unit
onResume()
Unit
onStop()
final Unit
hideKeyboard()
helper method to easily hide the soft keyboard final Unit
showKeyboard(EditText et)
helper method to easily show the soft keyboard final Unit
toast(@StringRes() Integer stringResId)
helper method to easily show a toast final Unit
toast(String text)
helper method to easily show a toast final Integer
getColor(@ColorRes() Integer colorResId)
helper method to easily retrieve a color resource -
Methods inherited from class com.pointrlabs.core.map.views.helper_views.PTRFragment
callStartTransitionListener, dump, equals, findFragmentByWho, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getAnimatingAway, getAnimator, getArguments, getChildFragmentManager, getContext, getEnterTransition, getEnterTransitionCallback, getExitTransition, getExitTransitionCallback, getFragmentManager, getHost, getId, getLayoutInflater, getLayoutInflater, getLifecycle, getLoaderManager, getNextAnim, getNextTransition, getNextTransitionStyle, getParentFragment, getReenterTransition, getResources, getRetainInstance, getReturnTransition, getSharedElementEnterTransition, getSharedElementReturnTransition, getStateAfterAnimating, getString, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, getViewLifecycleOwner, getViewLifecycleOwnerLiveData, getViewModelStore, hasOptionsMenu, hashCode, initState, instantiateChildFragmentManager, isAdded, isDetached, isHidden, isHideReplaced, isInBackStack, isInLayout, isMenuVisible, isPostponed, isRemoving, isResumed, isStateSaved, isVisible, noteStateNotSaved, onActivityResult, onAttach, onAttach, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreate, onCreateAnimation, onCreateAnimator, onCreateContextMenu, onCreateOptionsMenu, onDestroy, onDestroyOptionsMenu, onDestroyView, onDetach, onGetLayoutInflater, onHiddenChanged, onInflate, onInflate, onLowMemory, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPictureInPictureModeChanged, onPrepareOptionsMenu, onRequestPermissionsResult, onSaveInstanceState, onStart, onViewCreated, onViewStateRestored, peekChildFragmentManager, performActivityCreated, performConfigurationChanged, performContextItemSelected, performCreate, performCreateOptionsMenu, performCreateView, performDestroy, performDestroyView, performDetach, performGetLayoutInflater, performLowMemory, performMultiWindowModeChanged, performOptionsItemSelected, performOptionsMenuClosed, performPause, performPictureInPictureModeChanged, performPrepareOptionsMenu, performResume, performSaveInstanceState, performStart, performStop, postponeEnterTransition, registerForContextMenu, requestPermissions, requireActivity, requireContext, requireFragmentManager, requireHost, restoreChildFragmentState, restoreViewState, setAllowEnterTransitionOverlap, setAllowReturnTransitionOverlap, setAnimatingAway, setAnimator, setArguments, setEnterSharedElementCallback, setEnterTransition, setExitSharedElementCallback, setExitTransition, setHasOptionsMenu, setHideReplaced, setIndex, setInitialSavedState, setMenuVisibility, setNextAnim, setNextTransition, setOnStartEnterTransitionListener, setReenterTransition, setRetainInstance, setReturnTransition, setSharedElementEnterTransition, setSharedElementReturnTransition, setStateAfterAnimating, setTargetFragment, setUserVisibleHint, shouldShowRequestPermissionRationale, startActivity, startActivity, startActivityForResult, startActivityForResult, startIntentSenderForResult, startPostponedEnterTransition, toString, unregisterForContextMenu
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
PTRFragment
PTRFragment(Integer layoutResourceId)
-
-
Method Detail
-
onCreateView
View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
-
onActivityCreated
Unit onActivityCreated(Bundle savedInstanceState)
-
hideKeyboard
final Unit hideKeyboard()
helper method to easily hide the soft keyboard
-
showKeyboard
final Unit showKeyboard(EditText et)
helper method to easily show the soft keyboard
- Parameters:
et
- the EditText that should gain the keyboard focus
-
toast
final Unit toast(@StringRes() Integer stringResId)
helper method to easily show a toast
- Parameters:
stringResId
- resource id of the text to toast
-
toast
final Unit toast(String text)
helper method to easily show a toast
- Parameters:
text
- the text to toast
-
-
-
-