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); - } - } }