修改设置页面防抖问题,登录loading加载问题

This commit is contained in:
18401019693 2023-05-22 16:57:12 +08:00
parent 4f103dadc9
commit 3e72b4a9eb
2 changed files with 22 additions and 17 deletions

View File

@ -35,7 +35,6 @@ import com.yunbao.common.activity.WebViewActivity;
import com.yunbao.common.bean.ConfigBean;
import com.yunbao.common.bean.IMLoginModel;
import com.yunbao.common.bean.LiveBean;
import com.yunbao.common.bean.LoginData;
import com.yunbao.common.bean.UserAreaBean;
import com.yunbao.common.bean.UserBean;
import com.yunbao.common.fragment.LoadingDialog;
@ -51,7 +50,6 @@ import com.yunbao.common.manager.NoviceInstructorManager;
import com.yunbao.common.manager.imrongcloud.RongcloudIMManager;
import com.yunbao.common.utils.RouteUtil;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.common.views.weight.ViewClicksAntiShake;
import com.yunbao.live.http.LiveHttpUtil;
import com.yunbao.live.presenter.LiveRoomCheckLivePresenter;
@ -199,6 +197,7 @@ public class LoginActivity extends AbsActivity {
startActivity(new Intent(mContext, FindPwdActivity.class));
}
private LoadingDialog loadingDialog;
//手机号密码登录
private void login() {
@ -216,14 +215,13 @@ public class LoginActivity extends AbsActivity {
}
mLoginType = Constants.MOB_PHONE;
String uuid = DeviceUtils.getUniqueDeviceId();
LoadingDialog loadingDialog = new LoadingDialog();
loadingDialog = new LoadingDialog();
loadingDialog.show(getSupportFragmentManager(), "LoadingDialog");
loadingDialog.setShowText(getString(R.string.login_ing));
MainHttpUtil.login(phoneNum, pwd, uuid, new HttpCallback() {
@Override
public void onSuccess(int code, String msg, String[] info) {
onLoginSuccess(code, msg, info);
loadingDialog.dismiss();
}
});
hideKeyboard(mEditPwd);
@ -321,6 +319,7 @@ public class LoginActivity extends AbsActivity {
} else {
MainActivity.forward(LoginActivity.this, false);
}
loadingDialog.dismiss();
finish();
}
@ -378,11 +377,11 @@ public class LoginActivity extends AbsActivity {
mUuidDevice = DeviceUtils.getUniqueDeviceId();
}
private void initUserArea(){
private void initUserArea() {
LiveNetManager.get(mContext).getUserArea(new com.yunbao.common.http.base.HttpCallback<UserAreaBean>() {
@Override
public void onSuccess(UserAreaBean data) {
IMLoginManager.get(mContext).put("sys_user_area",data.getArea());
IMLoginManager.get(mContext).put("sys_user_area", data.getArea());
}
@Override

View File

@ -16,6 +16,7 @@ import com.yunbao.common.manager.APKManager;
import com.yunbao.common.manager.IMLoginManager;
import com.yunbao.common.utils.DeviceUtils;
import com.yunbao.common.utils.LogUtil;
import com.yunbao.common.views.weight.ViewClicksAntiShake;
import com.yunbao.main.R;
import com.yunbao.main.bean.SettingBean;
@ -46,7 +47,9 @@ public class SettingAdapter extends RecyclerView.Adapter {
mOnClickListener = new View.OnClickListener() {
@Override
public void onClick(View v) {
ViewClicksAntiShake.clicksAntiShake(v, new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
Object tag = v.getTag();
if (tag != null) {
int position = (int) tag;
@ -58,6 +61,9 @@ public class SettingAdapter extends RecyclerView.Adapter {
mOnItemClickListener.onItemClick(bean, position);
}
}
}
});
}