コード例 #1
0
  @Override
  public void onStart() {
    Log.d(TAG, "onStart");
    super.onStart();
    getActivity().setTitle("Shipping and payment methods");

    if (cart.shipping_method == null
        || cart.shipping_method.equals("")
        || !Cart.ShippingMethods.getLabels().containsKey(cart.shipping_method)) {
      cart.shipping_method = Cart.ShippingMethods.MAIL;
    }
    if (cart.payment_method == null
        || cart.payment_method.equals("")
        || !Cart.PaymentMethods.getLabels().containsKey(cart.payment_method)) {
      cart.payment_method = Cart.PaymentMethods.CREDIT_CARD;
    }
    shippingMethodField.setText(Cart.ShippingMethods.getLabel(cart.shipping_method));
    paymentMethodField.setText(Cart.PaymentMethods.getLabel(cart.payment_method));
  }
コード例 #2
0
 @Override
 public void onDialogSelect(ShippingMethodDialogFragment dialog, String method) {
   shippingMethodField.setText(Cart.ShippingMethods.getLabel(method));
   cart.shipping_method = method;
 }