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-StaticFilesParamsto useIntentKey.STATIC_FILE_TITLE- title for the content page, this is displayed on the toolbarIntentKey.STATIC_FILE_ALLOW_ZOOM-trueto allow zooming, else falseIntentKey.STATIC_FILE_OPEN_URL_EXTERNALLY-trueto 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 PcreatePresenter()InstantiateMvpFragmentView.mPresenterto be used for thisMvpActivityViewprotected intgetContentLayoutId()Provide the Content Layout ID which is of a Layout Resource Reference of AndroidintgetScreenName()voidloadUrlToWebView(java.lang.String url)This will be called by the presenter after successfully receiving the Static File URL from the server.voidonLoadFailed(java.lang.String error)voidonViewCreated(android.view.View view, android.os.Bundle savedInstanceState)booleanshouldOpenUrlExternally()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:MvpFragmentViewProvide the Content Layout ID which is of a Layout Resource Reference of Android- Specified by:
getContentLayoutIdin 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:
onViewCreatedin classLceFragmentView<V extends StaticFileView,P extends StaticFilePresenter<V>>
-
createPresenter
protected P createPresenter()
Description copied from class:MvpFragmentViewInstantiateMvpFragmentView.mPresenterto be used for thisMvpActivityView- Specified by:
createPresenterin classMvpFragmentView<V extends StaticFileView,P extends StaticFilePresenter<V>>- Returns:
- return the
MvpBasePresenter
-
loadUrlToWebView
public void loadUrlToWebView(java.lang.String url)
Description copied from interface:StaticFileViewThis will be called by the presenter after successfully receiving the Static File URL from the server.- Specified by:
loadUrlToWebViewin interfaceStaticFileView- Parameters:
url- The url of the Static File.
-
onLoadFailed
public void onLoadFailed(java.lang.String error)
- Specified by:
onLoadFailedin interfaceLceView- Overrides:
onLoadFailedin classLceFragmentView<V extends StaticFileView,P extends StaticFilePresenter<V>>
-
getScreenName
public int getScreenName()
- Specified by:
getScreenNamein interfaceAnalyticsManager.AnalyticsScreen- Overrides:
getScreenNamein 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.
-
-