Exemplo n.º 1
0
 protected int getReadyStringID() {
   return mPaymentContext instanceof RegularPaymentContext
       ? R.string.reader_state_ready_swipeonly
       : PaymentController.getInstance().getReaderType().isMultiInputSupported()
           ? R.string.reader_state_ready_multiinput
           : R.string.reader_state_ready;
 }
Exemplo n.º 2
0
 protected void action() {
   try {
     PaymentController.getInstance().startPayment(getContext(), mPaymentContext);
   } catch (PaymentException e) {
     onError(null, e.getMessage());
   }
 }
Exemplo n.º 3
0
  private void init() {
    getWindow().requestFeature(Window.FEATURE_NO_TITLE);
    setContentView(R.layout.dialog_payment);
    getWindow().getAttributes().gravity = Gravity.CENTER_VERTICAL;

    lblState = (TextView) findViewById(R.id.payment_dlg_lbl_state);
    imgSpinner = (ImageView) findViewById(R.id.payment_dlg_spinner);

    spinRotation =
        new RotateAnimation(
            0f, 360f, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
    spinRotation.setDuration(1200);
    spinRotation.setInterpolator(new LinearInterpolator());
    spinRotation.setRepeatMode(Animation.RESTART);
    spinRotation.setRepeatCount(Animation.INFINITE);

    PaymentController.getInstance().setPaymentControllerListener(this);
    PaymentController.getInstance().enable();
  }
Exemplo n.º 4
0
 @Override
 public void dismiss() {
   PaymentController.getInstance().disable();
   stopProgress();
   super.dismiss();
 }