public abstract class AbstractPaymentFragment
extends android.app.Fragment
FlowCoordinator.
This abstract fragment allows to process a whole payment flow. It manages every step of the payment flow. Customization options:
FragmentFlowListener which allows to modify the behaviour.createFlowConfigurationBuilder(FlowListener) method to adjust the
coordinator configuration to change the view etc.createPaymentContainerEnlarger(ViewGroup)
method to inject a custom enlarger which provides more flexibility around how the form behaves
within the activity.| Constructor and Description |
|---|
AbstractPaymentFragment() |
| Modifier and Type | Method and Description |
|---|---|
protected FragmentFlowListener |
createEventListener(PaymentContainerEnlarger enlarger,
FragmentTerminationListener fragmentTerminationListener,
android.view.ViewGroup fragmentView)
This method creates the fragment listener for the flow.
|
protected FlowConfiguration.Builder |
createFlowConfigurationBuilder(FlowListener listener)
This method constructs the coordinator configuration.
|
protected PaymentContainerEnlarger |
createPaymentContainerEnlarger(android.view.ViewGroup paymentFormContainer)
This method creates the view enlarger which is responsible to create more space for the
payment form within the activity.
|
protected abstract CredentialsProviderResolver |
getCredentialsProviderResolver()
This method returns the resolver of
CredentialsProvider. |
protected abstract FragmentTerminationListener |
getFragmentTerminationListener()
This method returns the listener which reacts up on the final states of the payment process.
|
boolean |
onBackPressed()
This method can be invoked to trigger going back within the payment fragment.
|
android.view.View |
onCreateView(android.view.LayoutInflater inflater,
android.view.ViewGroup container,
android.os.Bundle savedInstanceState) |
void |
onDestroy() |
void |
onSaveInstanceState(android.os.Bundle outState) |
dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getContext, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, getLayoutInflater, getLoaderManager, getParentFragment, getReenterTransition, getResources, getRetainInstance, getReturnTransition, getSharedElementEnterTransition, getSharedElementReturnTransition, getString, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, hashCode, instantiate, instantiate, isAdded, isDetached, isHidden, isInLayout, isRemoving, isResumed, isStateSaved, isVisible, onActivityCreated, onActivityResult, onAttach, onAttach, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreate, onCreateAnimator, onCreateContextMenu, onCreateOptionsMenu, onDestroyOptionsMenu, onDestroyView, onDetach, onGetLayoutInflater, onHiddenChanged, onInflate, onInflate, onInflate, onLowMemory, onMultiWindowModeChanged, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPictureInPictureModeChanged, onPictureInPictureModeChanged, onPrepareOptionsMenu, onRequestPermissionsResult, onResume, onStart, onStop, onTrimMemory, onViewCreated, onViewStateRestored, postponeEnterTransition, registerForContextMenu, requestPermissions, 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, unregisterForContextMenupublic boolean onBackPressed()
true when the event was handled by the fragment.protected abstract CredentialsProviderResolver getCredentialsProviderResolver()
CredentialsProvider. The implementor may create
an instance of it or fetch it from some other source.CredentialsProvider.protected abstract FragmentTerminationListener getFragmentTerminationListener()
public final android.view.View onCreateView(android.view.LayoutInflater inflater,
android.view.ViewGroup container,
android.os.Bundle savedInstanceState)
onCreateView in class android.app.Fragmentpublic void onSaveInstanceState(android.os.Bundle outState)
onSaveInstanceState in class android.app.Fragmentpublic void onDestroy()
onDestroy in class android.app.Fragmentprotected FlowConfiguration.Builder createFlowConfigurationBuilder(FlowListener listener)
FlowListener. It allows also to provide
custom view factories to inject custom views for the different views within the coordinator.listener - the fragment listener. This listener is responsible to react based upon the
events within the coordinator to adjust the fragment.protected FragmentFlowListener createEventListener(PaymentContainerEnlarger enlarger, FragmentTerminationListener fragmentTerminationListener, android.view.ViewGroup fragmentView)
enlarger - the enlarge which is used. This is created through createPaymentContainerEnlarger(ViewGroup),fragmentTerminationListener - the listener which coordinates the outcome of the payment
process.fragmentView - the fragment view holds all views for the fragment.protected PaymentContainerEnlarger createPaymentContainerEnlarger(android.view.ViewGroup paymentFormContainer)
paymentFormContainer - the container within which the coordinator places it's views.