Class MembershipCardFragment<V extends MembershipCardView,​P extends MembershipCardPresenter<V>>

    • Nested Class Summary

      • Nested classes/interfaces inherited from class androidx.fragment.app.Fragment

        androidx.fragment.app.Fragment.InstantiationException, androidx.fragment.app.Fragment.SavedState
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static void clearStellarMembershipCardSettings​(android.content.Context context)
      Removes stored banner image URI and tier label in the "membership_card_preferences" preferences.
      protected P createPresenter()
      Instantiate MvpFragmentView.mPresenter to be used for this MvpActivityView
      protected int getContentLayoutId()
      Provide the Content Layout ID which is of a Layout Resource Reference of Android
      int getScreenName()  
      void onActivityResult​(int requestCode, int resultCode, android.content.Intent data)  
      protected void onBannerSavingStarted​(java.lang.String uri)
      Method called when banner starts saving.
      void onCreate​(android.os.Bundle savedInstanceState)  
      void onCreateOptionsMenu​(android.view.Menu menu, android.view.MenuInflater inflater)  
      boolean onOptionsItemSelected​(android.view.MenuItem item)  
      void onPrepareOptionsMenu​(android.view.Menu menu)  
      void onViewCreated​(android.view.View view, android.os.Bundle savedInstanceState)  
      void saveData​(java.lang.String banner, java.lang.String tier)
      Stores the banner image URI and the tier label to the "membership_card_preferences" preferences "membership_card_banner" and "memberhip_card_tier_label" respectively.
      void savePhoto​(androidx.fragment.app.Fragment fragment, int requestCode)
      Used for choosing an image from the gallery or taking an image using the camera, and storing that corresponding file as the banner image.
      void showBanner​(java.lang.String uri)
      This will be called by the presenter after successfully retrieving the banner URI from the stored preferences.
      void showBannerNotAvailable()
      This will be called by the presenter if it fails to retrieve the banner image URI from the stored preferences.
      void showContent()
      Shows the content view.
      void showProfile​(Profile profile)
      This will be called by the presenter after successfully receiving Profile information from the SDK.
      void showProfileNotAvailable​(java.lang.String error)
      This will be called by the presenter after failing to receive Profile information from the SDK.
      void showTierLabel​(java.lang.String label)
      This will be called by the presenter after successfully retrieving the tier label from the stored preferences.
      void showTierLabelNotAvailable()
      This will be called by the presenter if it fails to retrieve the tier label from the stored preferences.
      • 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, onAttach, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreateAnimation, onCreateAnimator, onCreateContextMenu, onDestroy, onDestroyOptionsMenu, onDetach, onGetLayoutInflater, onHiddenChanged, onInflate, onInflate, onLowMemory, onMultiWindowModeChanged, onOptionsMenuClosed, onPause, onPictureInPictureModeChanged, 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
    • Constructor Detail

      • MembershipCardFragment

        public MembershipCardFragment()
    • Method Detail

      • clearStellarMembershipCardSettings

        public static void clearStellarMembershipCardSettings​(android.content.Context context)
        Removes stored banner image URI and tier label in the "membership_card_preferences" preferences.
        Parameters:
        context - Context to use to load the preferences.
      • onCreate

        public void onCreate​(@Nullable
                             android.os.Bundle savedInstanceState)
        Overrides:
        onCreate in class androidx.fragment.app.Fragment
      • onCreateOptionsMenu

        public void onCreateOptionsMenu​(android.view.Menu menu,
                                        android.view.MenuInflater inflater)
        Overrides:
        onCreateOptionsMenu in class androidx.fragment.app.Fragment
      • onPrepareOptionsMenu

        public void onPrepareOptionsMenu​(android.view.Menu menu)
        Overrides:
        onPrepareOptionsMenu in class androidx.fragment.app.Fragment
      • onOptionsItemSelected

        public boolean onOptionsItemSelected​(android.view.MenuItem item)
        Overrides:
        onOptionsItemSelected in class androidx.fragment.app.Fragment
      • showProfile

        public void showProfile​(Profile profile)
        Description copied from interface: MembershipCardView
        This will be called by the presenter after successfully receiving Profile information from the SDK.
        Specified by:
        showProfile in interface MembershipCardView
        Parameters:
        profile - The Profile received.
      • showProfileNotAvailable

        public void showProfileNotAvailable​(java.lang.String error)
        Description copied from interface: MembershipCardView
        This will be called by the presenter after failing to receive Profile information from the SDK.
        Specified by:
        showProfileNotAvailable in interface MembershipCardView
        Parameters:
        error - The error returned by the API call.
      • showBannerNotAvailable

        public void showBannerNotAvailable()
        Description copied from interface: MembershipCardView
        This will be called by the presenter if it fails to retrieve the banner image URI from the stored preferences.
        Specified by:
        showBannerNotAvailable in interface MembershipCardView
      • showBanner

        public void showBanner​(java.lang.String uri)
        Description copied from interface: MembershipCardView
        This will be called by the presenter after successfully retrieving the banner URI from the stored preferences.
        Specified by:
        showBanner in interface MembershipCardView
        Parameters:
        uri - The banner image URI as a String object.
      • showTierLabel

        public void showTierLabel​(java.lang.String label)
        Description copied from interface: MembershipCardView
        This will be called by the presenter after successfully retrieving the tier label from the stored preferences.
        Specified by:
        showTierLabel in interface MembershipCardView
        Parameters:
        label - The tier label retrieved.
      • onBannerSavingStarted

        protected void onBannerSavingStarted​(java.lang.String uri)
        Method called when banner starts saving. Override this method if needed
        Parameters:
        uri - uri for the temporary banner
      • onActivityResult

        public void onActivityResult​(int requestCode,
                                     int resultCode,
                                     android.content.Intent data)
        Overrides:
        onActivityResult in class androidx.fragment.app.Fragment
      • savePhoto

        public void savePhoto​(androidx.fragment.app.Fragment fragment,
                              int requestCode)
        Used for choosing an image from the gallery or taking an image using the camera, and storing that corresponding file as the banner image.
        Parameters:
        fragment - Calling fragment. This object will be used to start the chooser intent.
        requestCode - Request code to use for starting the chooser intent.