public class PaymentButton
extends android.app.Fragment
implements android.view.View.OnClickListener
PaymentMethodNonces will be posted to
PaymentMethodNonceCreatedListener.| Constructor and Description |
|---|
PaymentButton() |
| Modifier and Type | Method and Description |
|---|---|
static PaymentButton |
newInstance(android.app.Activity activity,
PaymentRequest paymentRequest)
Create a new instance of
PaymentButton using the CheckoutRequest and add it
to the Activity's FragmentManager. |
void |
onActivityCreated(android.os.Bundle savedInstanceState) |
void |
onClick(android.view.View v) |
void |
onConfigurationFetched(Configuration configuration) |
void |
onCreate(android.os.Bundle savedInstanceState) |
android.view.View |
onCreateView(android.view.LayoutInflater inflater,
android.view.ViewGroup container,
android.os.Bundle savedInstanceState) |
void |
onInflate(android.content.Context context,
android.util.AttributeSet attrs,
android.os.Bundle savedInstanceState) |
void |
onResponse(java.lang.Exception exception) |
void |
setOnClickListener(android.view.View.OnClickListener listener)
Set the on click listener to be called when the
PaymentButton is clicked. |
void |
setPaymentRequest(PaymentRequest paymentRequest)
Initialize the
PaymentButton. |
dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getContext, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, 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, isVisible, onActivityResult, onAttach, onAttach, onConfigurationChanged, onContextItemSelected, onCreateAnimator, onCreateContextMenu, onCreateOptionsMenu, onDestroy, onDestroyOptionsMenu, onDestroyView, onDetach, onHiddenChanged, onInflate, onInflate, onLowMemory, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPrepareOptionsMenu, onRequestPermissionsResult, onResume, onSaveInstanceState, onStart, onStop, onTrimMemory, onViewCreated, onViewStateRestored, registerForContextMenu, requestPermissions, setAllowEnterTransitionOverlap, setAllowReturnTransitionOverlap, setArguments, setEnterSharedElementCallback, setEnterTransition, setExitSharedElementCallback, setExitTransition, setHasOptionsMenu, setInitialSavedState, setMenuVisibility, setReenterTransition, setRetainInstance, setReturnTransition, setSharedElementEnterTransition, setSharedElementReturnTransition, setTargetFragment, setUserVisibleHint, shouldShowRequestPermissionRationale, startActivity, startActivity, startActivityForResult, startActivityForResult, toString, unregisterForContextMenupublic static PaymentButton newInstance(android.app.Activity activity, PaymentRequest paymentRequest) throws InvalidArgumentException
PaymentButton using the CheckoutRequest and add it
to the Activity's FragmentManager.activity - The Activity to add the Fragment to.paymentRequest - The PaymentRequest to use to configure the
PaymentButton. *Note:* This CheckoutRequest must include a client key
or client token.PaymentButtonInvalidArgumentException - If the client key or client token is not valid or cannot be
parsed.public void onInflate(android.content.Context context,
android.util.AttributeSet attrs,
android.os.Bundle savedInstanceState)
onInflate in class android.app.Fragmentpublic void onCreate(android.os.Bundle savedInstanceState)
onCreate in class android.app.Fragmentpublic android.view.View onCreateView(android.view.LayoutInflater inflater,
android.view.ViewGroup container,
android.os.Bundle savedInstanceState)
onCreateView in class android.app.Fragmentpublic void onActivityCreated(android.os.Bundle savedInstanceState)
onActivityCreated in class android.app.Fragmentpublic void setPaymentRequest(PaymentRequest paymentRequest) throws InvalidArgumentException
PaymentButton. This method *MUST* be called if the
PaymentButton was adding using XML or PaymentButton will not be displayed.paymentRequest - PaymentRequest containing payment method options.InvalidArgumentExceptionpublic void setOnClickListener(android.view.View.OnClickListener listener)
PaymentButton is clicked.listener - View.OnClickListener to be called.public void onConfigurationFetched(Configuration configuration)
public void onResponse(java.lang.Exception exception)
public void onClick(android.view.View v)
onClick in interface android.view.View.OnClickListener