protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.activity_polling); mCompositeSubscription = new CompositeDisposable(); mCardInputWidget = FindViewById <CardInputWidget>(Resource.Id.card_widget_three_d); mErrorDialogHandler = new ErrorDialogHandler(SupportFragmentManager); mProgressDialogController = new ProgressDialogController(SupportFragmentManager); mPollingDialogController = new PollingDialogController(this); mStripe = new Stripe(this); Button threeDSecureButton = FindViewById <Button>(Resource.Id.btn_three_d_secure); threeDSecureButton.Click += (s, e) => { BeginSequence(false); }; Button threeDSyncButton = FindViewById <Button>(Resource.Id.btn_three_d_secure_sync); threeDSyncButton.Click += (s, e) => { BeginSequence(true); }; RecyclerView recyclerView = FindViewById <RecyclerView>(Resource.Id.recycler_view); RecyclerView.LayoutManager linearLayoutManager = new LinearLayoutManager(this); recyclerView.HasFixedSize = true; recyclerView.SetLayoutManager(linearLayoutManager); mPollingAdapter = new PollingAdapter(); recyclerView.SetAdapter(mPollingAdapter); }
public void Detach() { if (mCompositeSubscription != null) { mCompositeSubscription.Clear(); } mCardInputWidget = null; }
/** * Unregister the {@link BroadcastReceiver}. */ public void Detach() { if (mTokenBroadcastReceiver != null) { LocalBroadcastManager.GetInstance(mActivity) .UnregisterReceiver(mTokenBroadcastReceiver); mTokenBroadcastReceiver = null; mActivity = null; } mCardInputWidget = null; }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.layout_card_input_widget); mCardInputWidget = FindViewById <CardInputWidget>(Resource.Id.card_input_widget); buttonVerify = FindViewById <Button>(Resource.Id.buttonVerify); buttonVerify.Click += ButtonVerify_Click; return; }
public DependencyHandler( AppCompatActivity activity, CardInputWidget cardInputWidget, ListView outputListView) { mCardInputWidget = cardInputWidget; mContext = activity.BaseContext; mProgresDialogController = new ProgressDialogController(activity.SupportFragmentManager); mListViewController = new ListViewController(outputListView); mErrorDialogHandler = new ErrorDialogHandler(activity.SupportFragmentManager); }
public AsyncTaskTokenController( Button button, CardInputWidget cardInputWidget, Context context, ErrorDialogHandler errorDialogHandler, ListViewController outputListController, ProgressDialogController progressDialogController, string publishableKey) { mCardInputWidget = cardInputWidget; mContext = context; mErrorDialogHandler = errorDialogHandler; mPublishableKey = publishableKey; mProgressDialogController = progressDialogController; mOutputListController = outputListController; button.Click += (s, e) => { SaveCard(); }; }
public IntentServiceTokenController( AppCompatActivity appCompatActivity, Button button, CardInputWidget cardInputWidget, ErrorDialogHandler errorDialogHandler, ListViewController outputListController, ProgressDialogController progressDialogController, string publishableKey) { mActivity = appCompatActivity; mCardInputWidget = cardInputWidget; mErrorDialogHandler = errorDialogHandler; mOutputListViewController = outputListController; mProgressDialogController = progressDialogController; mPublishableKey = publishableKey; button.Click += (s, e) => { SaveCard(); }; RegisterBroadcastReceiver(); }
public RxTokenController( Button button, CardInputWidget cardInputWidget, Context context, ErrorDialogHandler errorDialogHandler, ListViewController outputListController, ProgressDialogController progressDialogController, string publishableKey) { mCardInputWidget = cardInputWidget; mContext = context; mErrorDialogHandler = errorDialogHandler; mOutputListController = outputListController; mProgressDialogController = progressDialogController; mPublishableKey = publishableKey; mCompositeSubscription = new CompositeDisposable(); // mCompositeSubscription.Add(Disposable.Create(() => { SaveCard(); })); }
public void Detach() { mCardInputWidget = null; }