Class StaticFileFragment<V extends StaticFileView,P extends StaticFilePresenter<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.staticfiles.detail.StaticFileFragment<V,P>
-
- All Implemented Interfaces:
android.content.ComponentCallbacks
,android.view.View.OnCreateContextMenuListener
,androidx.lifecycle.LifecycleOwner
,androidx.lifecycle.ViewModelStoreOwner
,androidx.savedstate.SavedStateRegistryOwner
,StaticFileView
,AnalyticsManager.AnalyticsScreen
,LceView
,MvpLceView
,MvpView
public class StaticFileFragment<V extends StaticFileView,P extends StaticFilePresenter<V>> extends LceFragmentView<V,P> implements StaticFileView
Fragment that displays a Static File from the server. Can receive the following intent extra:IntentKey.PRIMARY_ID
- internal name of the content pageIntentKey.PRIMARY_PARAMS
-StaticFilesParams
to useIntentKey.STATIC_FILE_TITLE
- title for the content page, this is displayed on the toolbarIntentKey.STATIC_FILE_ALLOW_ZOOM
-true
to allow zooming, else falseIntentKey.STATIC_FILE_OPEN_URL_EXTERNALLY
-true
to open the link externally, else false
-
-
Field Summary
-
Fields inherited from class com.cheetahdigital.uikit.architecture.lce.LceFragmentView
mContentView, mErrorView, mInitialLoad, mLoadingView
-
-
Constructor Summary
Constructors Constructor Description StaticFileFragment()
-
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(java.lang.String url)
This will be called by the presenter after successfully receiving the Static File URL from the server.void
onLoadFailed(java.lang.String error)
void
onViewCreated(android.view.View view, android.os.Bundle savedInstanceState)
boolean
shouldOpenUrlExternally()
Configuration whether URL should be opened externally or within app.-
Methods inherited from class com.cheetahdigital.uikit.architecture.lce.LceFragmentView
onCreateView, 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
onLoadSuccess, setErrorViewClickListener
-
Methods inherited from interface com.cheetahdigital.uikit.architecture.lce.MvpLceView
showContent, showError, showLoading
-
-
-
-
Method Detail
-
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 StaticFileView,P extends StaticFilePresenter<V>>
- Returns:
- id of the content layout
-
onViewCreated
public void onViewCreated(android.view.View view, android.os.Bundle savedInstanceState)
- Overrides:
onViewCreated
in classLceFragmentView<V extends StaticFileView,P extends StaticFilePresenter<V>>
-
createPresenter
protected P createPresenter()
Description copied from class:MvpFragmentView
InstantiateMvpFragmentView.mPresenter
to be used for thisMvpActivityView
- Specified by:
createPresenter
in classMvpFragmentView<V extends StaticFileView,P extends StaticFilePresenter<V>>
- Returns:
- return the
MvpBasePresenter
-
loadUrlToWebView
public void loadUrlToWebView(java.lang.String url)
Description copied from interface:StaticFileView
This will be called by the presenter after successfully receiving the Static File URL from the server.- Specified by:
loadUrlToWebView
in interfaceStaticFileView
- Parameters:
url
- The url of the Static File.
-
onLoadFailed
public void onLoadFailed(java.lang.String error)
- Specified by:
onLoadFailed
in interfaceLceView
- Overrides:
onLoadFailed
in classLceFragmentView<V extends StaticFileView,P extends StaticFilePresenter<V>>
-
getScreenName
public int getScreenName()
- Specified by:
getScreenName
in interfaceAnalyticsManager.AnalyticsScreen
- Overrides:
getScreenName
in classMvpFragmentView<V extends StaticFileView,P extends StaticFilePresenter<V>>
-
shouldOpenUrlExternally
public boolean shouldOpenUrlExternally()
Configuration whether URL should be opened externally or within app.- Returns:
- True if we open links externally, false if we open in-app.
-
-