コード例 #1
0
 @Override
 public void onClick(View v) {
   switch (v.getId()) {
     case R.id.btn_sub:
       String extend_msg = et_extend_msg.getText().toString();
       String refund_amount = et_pay_price.getText().toString();
       if (Double.valueOf(refund_amount) > Double.valueOf(goods_pay_price)) {
         Toast.makeText(E3_Activity_Returns.this, "金额输入错误", Toast.LENGTH_LONG).show();
       } else {
         loadingPDialog.show();
         HttpUtils.refund(
             res, order_id, rec_id, refund_type, refund_amount, goods_num, extend_msg);
       }
       break;
     case R.id.ll_check_1:
       check_1.setChecked(true);
       check_2.setChecked(false);
       refund_type = "1";
       break;
     case R.id.ll_check_2:
       check_2.setChecked(true);
       check_1.setChecked(false);
       refund_type = "2";
       break;
     case R.id.iv_back:
       this.finish();
       break;
     default:
       break;
   }
 }
コード例 #2
0
  @Override
  public void onClick(View v) {
    switch (v.getId()) {
      case R.id.reset_btn:
        if (reset_password1.getText().toString().trim().length() < 8) {
          Toast.makeText(this, "密码须大于8位", Toast.LENGTH_SHORT).show();
        } else if (!reset_password1
            .getText()
            .toString()
            .equals(reset_password2.getText().toString())) {
          Toast.makeText(this, "输入的两次密码不相等", Toast.LENGTH_SHORT).show();
        } else {
          HttpUtils.resetPassword(
              res,
              phone.replaceAll(" ", ""),
              reset_password2.getText().toString().replaceAll(" ", ""));
        }
        break;
      case R.id.register_back:
        super.finish();
        overridePendingTransition(R.anim.push_left_in, R.anim.push_left_out);
        break;
      case R.id.policy:
        Intent intent = new Intent(E8_ResetPwdActivity.this, E13_User_policy_Activity.class);
        startActivity(intent);
        this.overridePendingTransition(R.anim.push_right_in, R.anim.push_right_out);
        break;

      default:
        break;
    }
  }
コード例 #3
0
 @Override
 protected void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   setContentView(R.layout.a1_special_activity);
   String special_id = getIntent().getStringExtra("special_id");
   HttpUtils.getSpecial(res_getGoodsList, special_id);
   loadingPDialog = new ProgressDialog(this);
   loadingPDialog.setMessage("正在加载....");
   loadingPDialog.setCancelable(false);
   loadingPDialog.show();
   banner = new ImageView(A1_SpecialActivity.this);
   title = (TextView) findViewById(R.id.top_view_text);
   back = (ImageView) findViewById(R.id.top_view_back);
   back.setOnClickListener(this);
   mGoodsListview = (MyListView) findViewById(R.id.special_goods_listview);
   mGoodsListview.setPullLoadEnable(false);
   banner.setScaleType(ScaleType.FIT_XY);
   mGoodsListview.addHeaderView(banner);
   mGoodsListview.setPullRefreshEnable(true);
   mGoodsListview.setXListViewListener(this, 0);
   mGoodsListview.setRefreshTime();
   goodsAdapter = new B1_GoodsAdapter(this, data);
   mGoodsListview.setAdapter(goodsAdapter);
 }