Пример #1
0
  private void connectToServerRegister() {
    if (checkInput()) {

      Utils.showProgressDialog(mContext);
      RegisterRequest request =
          new RegisterRequest(
              new Response.Listener<RegisterResponse>() {
                @Override
                public void onResponse(RegisterResponse response) {
                  Utils.closeDialog();
                  RegisterResponse.RegisterData data = response.data;
                  CnpcApplication.getInstance().setCheckID(data.id);
                  Utils.moveTo(mContext, SoftwareShareActivity.class);
                }
              },
              this);
      request.setOilId(sunyardoils.get(spinner.getSpinnerText()));
      request.setPassword(et_pwds.getText().toString().trim());
      request.setCellphone(et_telNo.getText().toString().trim());
      request.setValidationCode(et_valNo.getText().toString().trim());
      request.setLongitude(longitude);
      request.setLatitude(latitude);
      request.setAddressid(cityId);
      WebUtils.doPost(request);
    }
  }
Пример #2
0
  @Override
  public void onClick(View v) {
    switch (v.getId()) {
      case R.id.registered_success:
        if (checkInput()) {

          Intent intent = new Intent();
          intent.putExtra("setOilId", sunyardoils.get(spinner.getSpinnerText()));
          intent.putExtra("setPassword", et_pwds.getText().toString().trim());
          intent.putExtra("setCellphone", et_telNo.getText().toString().trim());
          intent.putExtra("setValidationCode", et_valNo.getText().toString().trim());
          intent.putExtra("setLongitude", longitude);
          intent.putExtra("setLatitude", latitude);
          intent.putExtra("timeLimit", cityId);
          intent.setClass(this, SoftwareShareActivity.class);
          startActivity(intent);
        }

        break;
      case R.id.registration_agreement:
        Utils.moveTo(this, RegistrationAgreementActivity.class);
        break;
    }
  }
Пример #3
0
 private void wrapOilsData(ArrayList<SunyardOilResponse.SunyardOilDto> data) {
   for (int i = 0; i < data.size(); i++) {
     String temp =
         "92".equals(data.get(i).productName)
             ? "92#/93#"
             : "93".equals(data.get(i).productName)
                 ? "92#/93#"
                 : "95".equals(data.get(i).productName)
                     ? "95#/97#"
                     : "97".equals(data.get(i).productName)
                         ? "95#/97#"
                         : data.get(i).productName + "#";
     sunyardoils.put(temp, data.get(i).id);
     oilDataList.add(temp);
   }
   spinner.setDatas(oilDataList);
   spinner.setLabelText("关注油品");
   spinner.setLabelTextSize(13);
   spinner.setLabelTextColor(Color.parseColor("#323232"));
   spinner.setDefaultText();
   spinner.setSpinnerTextSize(13);
 }