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 theContentPage
Can 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
-true
to open the link externally, else falseIntentKey.CONTENT_PAGE_ALLOW_ZOOM
-true
to 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
-true
to zoom out the content when greater than web view window, else falseIntentKey.PRIMARY_PARAMS
=ContentPagesParams
to 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 P
createPresenter()
InstantiateMvpFragmentView.mPresenter
to be used for thisMvpActivityView
protected int
getContentLayoutId()
Provide the Content Layout ID which is of a Layout Resource Reference of Androidint
getScreenName()
void
loadUrlToWebView(ContentPage contentPage)
This will be called by the presenter after a successful call to the APIvoid
onViewCreated(android.view.View view, android.os.Bundle savedInstanceState)
boolean
shouldOpenUrlExternally()
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:
onViewCreated
in classLceFragmentView<V extends ContentPageView,P extends ContentPagePresenter<V>>
-
getContentLayoutId
protected int getContentLayoutId()
Description copied from class:MvpFragmentView
Provide the Content Layout ID which is of a Layout Resource Reference of Android- Specified by:
getContentLayoutId
in classMvpFragmentView<V extends ContentPageView,P extends ContentPagePresenter<V>>
- Returns:
- id of the content layout
-
createPresenter
protected P createPresenter()
Description copied from class:MvpFragmentView
InstantiateMvpFragmentView.mPresenter
to be used for thisMvpActivityView
- Specified by:
createPresenter
in classMvpFragmentView<V extends ContentPageView,P extends ContentPagePresenter<V>>
- Returns:
- return the
MvpBasePresenter
-
loadUrlToWebView
public void loadUrlToWebView(ContentPage contentPage)
Description copied from interface:ContentPageView
This will be called by the presenter after a successful call to the API- Specified by:
loadUrlToWebView
in interfaceContentPageView
- Parameters:
contentPage
-ContentPage
from the API
-
shouldOpenUrlExternally
public boolean shouldOpenUrlExternally()
Return current configuration for opening url externally- Returns:
true
if url should be opened externally, else false
-
getScreenName
public int getScreenName()
- Specified by:
getScreenName
in interfaceAnalyticsManager.AnalyticsScreen
- Overrides:
getScreenName
in classMvpFragmentView<V extends ContentPageView,P extends ContentPagePresenter<V>>
-
-