Class AddGiftcardDialogFragment
- java.lang.Object
-
- androidx.fragment.app.Fragment
-
- androidx.fragment.app.DialogFragment
-
- com.cheetahdigital.giftcards.ui.dialogs.AddGiftcardDialogFragment
-
- All Implemented Interfaces:
android.content.ComponentCallbacks
,android.content.DialogInterface.OnCancelListener
,android.content.DialogInterface.OnDismissListener
,android.view.View.OnCreateContextMenuListener
,androidx.lifecycle.LifecycleOwner
,androidx.lifecycle.ViewModelStoreOwner
,androidx.savedstate.SavedStateRegistryOwner
,AnalyticsManager.AnalyticsScreen
public class AddGiftcardDialogFragment extends androidx.fragment.app.DialogFragment implements AnalyticsManager.AnalyticsScreen
Displays a dialog which allows adding of Gift card using the card number and pin.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
TAG
-
Constructor Summary
Constructors Constructor Description AddGiftcardDialogFragment()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getScreenName()
android.app.Dialog
onCreateDialog(android.os.Bundle savedInstanceState)
protected void
onShowDialog(android.content.DialogInterface dialog)
Called when the dialog is shown.void
setListener(OnAddGiftcardListener listener)
Sets the listener for adding a gift cardOnAddGiftcardListener
void
showHiddenDialog()
Shows the hidden dialog-
Methods inherited from class androidx.fragment.app.DialogFragment
dismiss, dismissAllowingStateLoss, getDialog, getShowsDialog, getTheme, isCancelable, onActivityCreated, onAttach, onCancel, onCreate, onDestroyView, onDetach, onDismiss, onGetLayoutInflater, onSaveInstanceState, onStart, onStop, requireDialog, setCancelable, setShowsDialog, setStyle, setupDialog, show, show, showNow
-
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, onActivityResult, onAttach, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreateAnimation, onCreateAnimator, onCreateContextMenu, onCreateOptionsMenu, onCreateView, onDestroy, onDestroyOptionsMenu, onHiddenChanged, onInflate, onInflate, onLowMemory, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPictureInPictureModeChanged, onPrepareOptionsMenu, onPrimaryNavigationFragmentChanged, onRequestPermissionsResult, onResume, onViewCreated, 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, startActivity, startActivityForResult, startActivityForResult, startIntentSenderForResult, startPostponedEnterTransition, toString, unregisterForContextMenu
-
-
-
-
Field Detail
-
TAG
public static final java.lang.String TAG
- See Also:
- Constant Field Values
-
-
Method Detail
-
getScreenName
public int getScreenName()
- Specified by:
getScreenName
in interfaceAnalyticsManager.AnalyticsScreen
-
onCreateDialog
public android.app.Dialog onCreateDialog(android.os.Bundle savedInstanceState)
- Overrides:
onCreateDialog
in classandroidx.fragment.app.DialogFragment
-
setListener
public void setListener(OnAddGiftcardListener listener)
Sets the listener for adding a gift cardOnAddGiftcardListener
- Parameters:
listener
- callback for adding gift
-
onShowDialog
protected void onShowDialog(android.content.DialogInterface dialog)
Called when the dialog is shown. Default behavior is to show input fields for card number and pin of the gift card. Upon clicking add button,OnAddGiftcardListener.onAddGiftcard(String, String)
is invoked.- Parameters:
dialog
- the dialog that was shown
-
showHiddenDialog
public void showHiddenDialog()
Shows the hidden dialog
-
-