修改设置页面防抖问题,登录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.ConfigBean;
import com.yunbao.common.bean.IMLoginModel; import com.yunbao.common.bean.IMLoginModel;
import com.yunbao.common.bean.LiveBean; import com.yunbao.common.bean.LiveBean;
import com.yunbao.common.bean.LoginData;
import com.yunbao.common.bean.UserAreaBean; import com.yunbao.common.bean.UserAreaBean;
import com.yunbao.common.bean.UserBean; import com.yunbao.common.bean.UserBean;
import com.yunbao.common.fragment.LoadingDialog; 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.manager.imrongcloud.RongcloudIMManager;
import com.yunbao.common.utils.RouteUtil; import com.yunbao.common.utils.RouteUtil;
import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.common.views.weight.ViewClicksAntiShake; import com.yunbao.common.views.weight.ViewClicksAntiShake;
import com.yunbao.live.http.LiveHttpUtil; import com.yunbao.live.http.LiveHttpUtil;
import com.yunbao.live.presenter.LiveRoomCheckLivePresenter; import com.yunbao.live.presenter.LiveRoomCheckLivePresenter;
@ -199,6 +197,7 @@ public class LoginActivity extends AbsActivity {
startActivity(new Intent(mContext, FindPwdActivity.class)); startActivity(new Intent(mContext, FindPwdActivity.class));
} }
private LoadingDialog loadingDialog;
//手机号密码登录 //手机号密码登录
private void login() { private void login() {
@ -216,14 +215,13 @@ public class LoginActivity extends AbsActivity {
} }
mLoginType = Constants.MOB_PHONE; mLoginType = Constants.MOB_PHONE;
String uuid = DeviceUtils.getUniqueDeviceId(); String uuid = DeviceUtils.getUniqueDeviceId();
LoadingDialog loadingDialog = new LoadingDialog(); loadingDialog = new LoadingDialog();
loadingDialog.show(getSupportFragmentManager(), "LoadingDialog"); loadingDialog.show(getSupportFragmentManager(), "LoadingDialog");
loadingDialog.setShowText(getString(R.string.login_ing)); loadingDialog.setShowText(getString(R.string.login_ing));
MainHttpUtil.login(phoneNum, pwd, uuid, new HttpCallback() { MainHttpUtil.login(phoneNum, pwd, uuid, new HttpCallback() {
@Override @Override
public void onSuccess(int code, String msg, String[] info) { public void onSuccess(int code, String msg, String[] info) {
onLoginSuccess(code, msg, info); onLoginSuccess(code, msg, info);
loadingDialog.dismiss();
} }
}); });
hideKeyboard(mEditPwd); hideKeyboard(mEditPwd);
@ -321,6 +319,7 @@ public class LoginActivity extends AbsActivity {
} else { } else {
MainActivity.forward(LoginActivity.this, false); MainActivity.forward(LoginActivity.this, false);
} }
loadingDialog.dismiss();
finish(); finish();
} }

View File

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