Ejemplo n.º 1
0
 @Override
 public void onClick(View v) {
   if (v.getId() == R.id.btn_login) {
     if (tv_name.getText().toString().equals("")) {
       Toast.makeText(getContext(), "ÇëÊäÈëÄúµÄÊÖ»úºÅ", Toast.LENGTH_LONG).show();
     } else if (tv_password.getText().toString().equals("")) {
       Toast.makeText(getContext(), "ÇëÊäÈëÃÜÂë", Toast.LENGTH_LONG).show();
     } else {
       LoadingDialog.showWindow(getContext());
       MyHttp http = new MyHttp(getContext());
       Map<String, String> params = new HashMap<String, String>();
       params.put("phone", tv_name.getText().toString());
       params.put("pwd", MyUtil.stringToMD5(tv_password.getText().toString()));
       String url = UrlUtil.getUrl("login_pwd", UrlUtil.Service);
       http.Http_post(url, params, this);
     }
   }
 }
Ejemplo n.º 2
0
 private void cancleDialog() {
   if (LoadingDialog.isShowing()) {
     LoadingDialog.dismiss();
   }
 }