Class ProductComponentFragment<V extends ProductGroupComponentView,P extends ProductGroupComponentPresenter<V>>
- java.lang.Object
-
- androidx.fragment.app.Fragment
-
- com.cheetahdigital.uikit.architecture.mvp.MvpFragmentView<V,P>
-
- com.cheetahdigital.products.ui.component.ProductComponentFragment<V,P>
-
- All Implemented Interfaces:
android.content.ComponentCallbacks,android.view.View.OnCreateContextMenuListener,androidx.lifecycle.LifecycleOwner,androidx.lifecycle.ViewModelStoreOwner,androidx.savedstate.SavedStateRegistryOwner,AnalyticsManager.AnalyticsScreen,MvpView
public class ProductComponentFragment<V extends ProductGroupComponentView,P extends ProductGroupComponentPresenter<V>> extends MvpFragmentView<V,P>
This fragment shows a list ofProductComponentsAdapter
-
-
Constructor Summary
Constructors Constructor Description ProductComponentFragment(java.util.List<Component> productComponentList)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected VerticalSpaceItemDecorationcreateItemDecoration()Create theRecyclerView.ItemDecorationused in the RecyclerView.protected PcreatePresenter()InstantiateMvpFragmentView.mPresenterto be used for thisMvpActivityViewprotected intgetContentLayoutId()Provide the Content Layout ID which is of a Layout Resource Reference of Androidprotected ProductComponentsAdaptergetProductComponentsAdapter()Create an adapter that shows list ofComponentvoidonAttach(android.content.Context context)android.view.ViewonCreateView(android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState)voidsetMaxSelection(int maxSelection)Set current max selectionvoidsetTabPage(int tabPage)Set current page on which the fragment is attached to-
Methods inherited from class com.cheetahdigital.uikit.architecture.mvp.MvpFragmentView
captureSharedElementValues, getPresenter, getScreenName, getSharedElementViews, initSharedElementValues, isSharedAnimationEnabled, onDestroyView, onViewCreated, 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
-
-
-
-
Constructor Detail
-
ProductComponentFragment
public ProductComponentFragment(java.util.List<Component> productComponentList)
-
-
Method Detail
-
onAttach
public void onAttach(@NonNull android.content.Context context)- Overrides:
onAttachin classMvpFragmentView<V extends ProductGroupComponentView,P extends ProductGroupComponentPresenter<V>>
-
onCreateView
@Nullable public android.view.View onCreateView(android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState)- Overrides:
onCreateViewin classMvpFragmentView<V extends ProductGroupComponentView,P extends ProductGroupComponentPresenter<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 ProductGroupComponentView,P extends ProductGroupComponentPresenter<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 ProductGroupComponentView,P extends ProductGroupComponentPresenter<V>>- Returns:
- return the
MvpBasePresenter
-
setTabPage
public void setTabPage(int tabPage)
Set current page on which the fragment is attached to- Parameters:
tabPage- current tab page
-
setMaxSelection
public void setMaxSelection(int maxSelection)
Set current max selection- Parameters:
maxSelection- number of components that can be selected
-
getProductComponentsAdapter
protected ProductComponentsAdapter getProductComponentsAdapter()
Create an adapter that shows list ofComponent- Returns:
- instance of
ProductComponentsAdapter
-
createItemDecoration
protected VerticalSpaceItemDecoration createItemDecoration()
Create theRecyclerView.ItemDecorationused in the RecyclerView. This will be invoked when initializing the list for the first time.- Returns:
- instance of
VerticalSpaceItemDecorationused for item decoration
-
-