From 3e72b4a9eb04421624f446da28853f97be26625c Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Mon, 22 May 2023 16:57:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AE=BE=E7=BD=AE=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E9=98=B2=E6=8A=96=E9=97=AE=E9=A2=98=EF=BC=8C=E7=99=BB?= =?UTF-8?q?=E5=BD=95loading=E5=8A=A0=E8=BD=BD=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yunbao/main/activity/LoginActivity.java | 11 ++++---- .../yunbao/main/adapter/SettingAdapter.java | 28 +++++++++++-------- 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/main/src/main/java/com/yunbao/main/activity/LoginActivity.java b/main/src/main/java/com/yunbao/main/activity/LoginActivity.java index cb22473fe..893aed05c 100644 --- a/main/src/main/java/com/yunbao/main/activity/LoginActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/LoginActivity.java @@ -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() { @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 diff --git a/main/src/main/java/com/yunbao/main/adapter/SettingAdapter.java b/main/src/main/java/com/yunbao/main/adapter/SettingAdapter.java index f59ae20c1..d14408af4 100644 --- a/main/src/main/java/com/yunbao/main/adapter/SettingAdapter.java +++ b/main/src/main/java/com/yunbao/main/adapter/SettingAdapter.java @@ -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,18 +47,23 @@ 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; + SettingBean bean = mList.get(position); + if (bean.getId() == 19) { + LogUtil.shareFile(context); + } + if (mOnItemClickListener != null) { + mOnItemClickListener.onItemClick(bean, position); + } + } + } + }); - Object tag = v.getTag(); - if (tag != null) { - int position = (int) tag; - SettingBean bean = mList.get(position); - if (bean.getId() == 19) { - LogUtil.shareFile(context); - } - if (mOnItemClickListener != null) { - mOnItemClickListener.onItemClick(bean, position); - } - } }