Example #1
0
 public static int getday2now(String ltime) {
   BingLog.i("时间", "时间:" + ltime);
   long time = BingDateUtils.getTime(ltime);
   long now = System.currentTimeMillis();
   long msg = time;
   long calcMills = now - msg;
   long calDay = calcMills / 1000 / 60 / 60 / 24;
   BingLog.i("时间", "时间:" + calDay);
   return (int) calDay;
 }
Example #2
0
  private void startMainActivity() {

    UserAccountBean userAccountBean = new UserAccountBean();
    userAccountBean.setPassword(passWordt.getText().toString());
    userAccountBean.setUsername(phone_edit.getText().toString());

    long update = new AccountUtils(context).update(userAccountBean);
    BingLog.i(TAG, "¸üÐÂ:" + update);
    BingLog.i(TAG, "×¢²áÃÜÂë:" + passWordt.getText().toString());
    if (update < 1) {
      new AccountUtils(context).insert(userAccountBean);
    }

    startActivity(new Intent(context, MainActivity.class));
    finish();
  }
Example #3
0
 @Override
 public void onTextChanged(CharSequence s, int start, int before, int count) {
   // TODO Auto-generated method stub
   BingLog.i(TAG, "daxiao:" + s.length());
   if (s.length() < 6) {
     passWordo.setError(getString(R.string.password_notice_o));
   } else {
     passWordo.setError(null);
   }
 }
Example #4
0
  private void parseJson(JSONObject response) {
    BingLog.i(TAG, "×¢²á·µ»Ø:" + response);
    if (JsonUtils.isSuccess(response)) {
      JSONObject object;
      try {
        object = response.getJSONObject("user");
        PersonalInfo info = JsonUtils.getInfo(object);
        if (null != info) {
          WyyApplication.setInfo(info);
          SavePersonInfoUtlis.setPersonInfo(info, context);
          startMainActivity();
        } else {
          Toast.makeText(context, R.string.regeit_failure, Toast.LENGTH_SHORT).show();
        }
      } catch (JSONException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
        Toast.makeText(context, R.string.regeit_failure, Toast.LENGTH_SHORT).show();
      }

    } else {
      Toast.makeText(context, R.string.regeit_failure, Toast.LENGTH_SHORT).show();
    }
  }
 @Override
 public void onReceive(Context context, Intent intent) {
   // TODO Auto-generated method stub
   BingLog.i(TAG, "¸öÈËÖÐÐÄ" + intent.getAction());
   reshInfo();
 }
 @Override
 public void onReceive(Context context, Intent intent) {
   // TODO Auto-generated method stub
   BingLog.i(TAG, "个人中心" + intent.getAction());
   initPersonInfo();
 }