Class ContentPageFragment<V extends ContentPageView,P extends ContentPagePresenter<V>>
- java.lang.Object
-
- androidx.fragment.app.Fragment
-
- com.cheetahdigital.uikit.architecture.mvp.MvpFragmentView<V,P>
-
- com.cheetahdigital.uikit.architecture.lce.LceFragmentView<V,P>
-
- com.cheetahdigital.content.ui.contentpage.detail.ContentPageFragment<V,P>
-
- All Implemented Interfaces:
android.content.ComponentCallbacks,android.view.View.OnCreateContextMenuListener,androidx.lifecycle.LifecycleOwner,androidx.lifecycle.ViewModelStoreOwner,androidx.savedstate.SavedStateRegistryOwner,ContentPageView,AnalyticsManager.AnalyticsScreen,LceView,MvpLceView,MvpView
public class ContentPageFragment<V extends ContentPageView,P extends ContentPagePresenter<V>> extends LceFragmentView<V,P> implements ContentPageView
This fragment shows theContentPageCan receive the following intent extra:IntentKey.PRIMARY_ID- internal name of the content pageIntentKey.CONTENT_PAGE_SCREEN_NAME- screen name for the page, this is usually used for analyticsIntentKey.CONTENT_PAGE_OPEN_URL_EXTERNALLY-trueto open the link externally, else falseIntentKey.CONTENT_PAGE_ALLOW_ZOOM-trueto allow zooming, else falseIntentKey.CONTENT_PAGE_APPEND_STRING_TO_URL- append this string to url retrieve from the content page nameIntentKey.CONTENT_PAGE_WRAP_CONTENT-trueto zoom out the content when greater than web view window, else falseIntentKey.PRIMARY_PARAMS=ContentPagesParamsto use forContentPagesAPI
-
-
Field Summary
-
Fields inherited from class com.cheetahdigital.uikit.architecture.lce.LceFragmentView
mContentView, mErrorView, mInitialLoad, mLoadingView
-
-
Constructor Summary
Constructors Constructor Description ContentPageFragment()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected PcreatePresenter()InstantiateMvpFragmentView.mPresenterto be used for thisMvpActivityViewprotected intgetContentLayoutId()Provide the Content Layout ID which is of a Layout Resource Reference of AndroidintgetScreenName()voidloadUrlToWebView(ContentPage contentPage)This will be called by the presenter after a successful call to the APIvoidonViewCreated(android.view.View view, android.os.Bundle savedInstanceState)booleanshouldOpenUrlExternally()Return current configuration for opening url externally-
Methods inherited from class com.cheetahdigital.uikit.architecture.lce.LceFragmentView
onCreateView, onLoadFailed, onLoadSuccess, setErrorViewClickListener, showContent, showError, showLoading
-
Methods inherited from class com.cheetahdigital.uikit.architecture.mvp.MvpFragmentView
captureSharedElementValues, getPresenter, getSharedElementViews, initSharedElementValues, isSharedAnimationEnabled, onAttach, onDestroyView, startActivity, startActivityForResult
-
Methods inherited from class androidx.fragment.app.Fragment
dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getContext, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, getLayoutInflater, getLayoutInflater, getLifecycle, getLoaderManager, getParentFragment, 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, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreate, onCreateAnimation, onCreateAnimator, onCreateContextMenu, onCreateOptionsMenu, onDestroy, onDestroyOptionsMenu, onDetach, onGetLayoutInflater, onHiddenChanged, onInflate, onInflate, onLowMemory, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPictureInPictureModeChanged, onPrepareOptionsMenu, onPrimaryNavigationFragmentChanged, onRequestPermissionsResult, onResume, onSaveInstanceState, onStart, onStop, onViewStateRestored, postponeEnterTransition, postponeEnterTransition, registerForContextMenu, requestPermissions, requireActivity, requireArguments, requireContext, requireFragmentManager, requireHost, requireParentFragment, requireView, setAllowEnterTransitionOverlap, setAllowReturnTransitionOverlap, setArguments, setEnterSharedElementCallback, setEnterTransition, setExitSharedElementCallback, setExitTransition, setHasOptionsMenu, setInitialSavedState, setMenuVisibility, setReenterTransition, setRetainInstance, setReturnTransition, setSharedElementEnterTransition, setSharedElementReturnTransition, setTargetFragment, setUserVisibleHint, shouldShowRequestPermissionRationale, startActivity, startActivityForResult, startIntentSenderForResult, startPostponedEnterTransition, toString, unregisterForContextMenu
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.cheetahdigital.uikit.architecture.lce.LceView
onLoadFailed, onLoadSuccess, setErrorViewClickListener
-
Methods inherited from interface com.cheetahdigital.uikit.architecture.lce.MvpLceView
showContent, showError, showLoading
-
-
-
-
Method Detail
-
onViewCreated
public void onViewCreated(android.view.View view, android.os.Bundle savedInstanceState)- Overrides:
onViewCreatedin classLceFragmentView<V extends ContentPageView,P extends ContentPagePresenter<V>>
-
getContentLayoutId
protected int getContentLayoutId()
Description copied from class:MvpFragmentViewProvide the Content Layout ID which is of a Layout Resource Reference of Android- Specified by:
getContentLayoutIdin classMvpFragmentView<V extends ContentPageView,P extends ContentPagePresenter<V>>- Returns:
- id of the content layout
-
createPresenter
protected P createPresenter()
Description copied from class:MvpFragmentViewInstantiateMvpFragmentView.mPresenterto be used for thisMvpActivityView- Specified by:
createPresenterin classMvpFragmentView<V extends ContentPageView,P extends ContentPagePresenter<V>>- Returns:
- return the
MvpBasePresenter
-
loadUrlToWebView
public void loadUrlToWebView(ContentPage contentPage)
Description copied from interface:ContentPageViewThis will be called by the presenter after a successful call to the API- Specified by:
loadUrlToWebViewin interfaceContentPageView- Parameters:
contentPage-ContentPagefrom the API
-
shouldOpenUrlExternally
public boolean shouldOpenUrlExternally()
Return current configuration for opening url externally- Returns:
trueif url should be opened externally, else false
-
getScreenName
public int getScreenName()
- Specified by:
getScreenNamein interfaceAnalyticsManager.AnalyticsScreen- Overrides:
getScreenNamein classMvpFragmentView<V extends ContentPageView,P extends ContentPagePresenter<V>>
-
-