登录按钮添加防抖以及加载loading
This commit is contained in:
parent
291578cd72
commit
041bcaf2ec
@ -40,6 +40,7 @@ import com.arpa.hndahesudintocctmsdriver.util.PickerUtils;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.PicturlUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.alert.ToastUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.map.MapUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.weight.OnLimitClickHelper;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.request.RequestOptions;
|
||||
import com.bumptech.glide.request.target.Target;
|
||||
@ -748,7 +749,7 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
||||
}
|
||||
});
|
||||
|
||||
submit.setOnClickListener(v -> {
|
||||
submit.setOnClickListener(new OnLimitClickHelper(v->{
|
||||
if (!isAuth) {
|
||||
subimt();
|
||||
} else {
|
||||
@ -792,7 +793,7 @@ public class CertificatesActivity extends BaseAppCompatActivity {
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
}));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -32,6 +32,8 @@ import com.arpa.hndahesudintocctmsdriver.request.net.BaseObserver;
|
||||
import com.arpa.hndahesudintocctmsdriver.request.net.DataManager;
|
||||
import com.arpa.hndahesudintocctmsdriver.request.net.RxHttpCallBack;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.web.WebOnlyOneActivity;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.alert.CustomDialog;
|
||||
import com.arpa.hndahesudintocctmsdriver.weight.OnLimitClickHelper;
|
||||
import com.dahe.mylibrary.net.CommonResponseBean;
|
||||
import com.google.gson.Gson;
|
||||
import com.arpa.hndahesudintocctmsdriver.R;
|
||||
@ -77,6 +79,7 @@ public class LoginActivity extends BaseActivity {
|
||||
private int timer_sum = 60;
|
||||
private CheckBox cb;
|
||||
private UserRequset ur;
|
||||
private CustomDialog customDialog;
|
||||
|
||||
@Override
|
||||
public void msgMethod(Message m) {
|
||||
@ -95,6 +98,8 @@ public class LoginActivity extends BaseActivity {
|
||||
Log.e("--短信发送res--", "短信发送成功");
|
||||
}
|
||||
if (CacheGroup.cacheList.get(LOGIN_RESULT) != null) {
|
||||
if (customDialog!=null&&customDialog.isShowing())
|
||||
customDialog.dismiss();
|
||||
//存储登录记录
|
||||
loginBean = new Gson().fromJson(CacheGroup.cacheList.get(LOGIN_RESULT), LoginBean.class);
|
||||
Log.e("--登录信息--", new Gson().toJson(loginBean));
|
||||
@ -227,12 +232,14 @@ public class LoginActivity extends BaseActivity {
|
||||
}
|
||||
}
|
||||
});
|
||||
btn_login.setOnClickListener(v -> {
|
||||
btn_login.setOnClickListener(new OnLimitClickHelper(v -> {
|
||||
String phone = String.valueOf(input_phone.getText());
|
||||
String code = String.valueOf(input_code.getText());
|
||||
Log.e("--code--", code);
|
||||
if (judgeFormat(phone, code)) {
|
||||
if (key) {
|
||||
customDialog = new CustomDialog(con, "登陆中...");
|
||||
customDialog.show();
|
||||
LoginRegInputBean lb = new LoginRegInputBean();
|
||||
lb.setRoleId(4);
|
||||
lb.setUname(phone);
|
||||
@ -244,7 +251,7 @@ public class LoginActivity extends BaseActivity {
|
||||
Toast.makeText(con, "请先同意用户协议和隐私政策", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}));
|
||||
auto_login.setOnClickListener(v -> {
|
||||
JVerificationInterface.getToken(con, 20000, (i, s, s1) -> {
|
||||
JVerifyUIConfig uiConfig = new JVerifyUIConfig.Builder()
|
||||
|
@ -105,6 +105,8 @@ public class BaseRecyclerView extends RecyclerView {
|
||||
ra.addItem(mb);
|
||||
}
|
||||
public void adds(List<ManyBean> list){
|
||||
if (ra==null)
|
||||
return;
|
||||
ra.add(list);
|
||||
}
|
||||
public AdapterAlls createsH(Context con, List<ManyBean> list){
|
||||
|
Loading…
Reference in New Issue
Block a user