一键登录 loading hide,fix bug
This commit is contained in:
@@ -75,9 +75,20 @@ public class LaunchPageActivity extends BaseMvpActivity<IPresenter, ActivityLaun
|
||||
private VideoView videoView;
|
||||
private boolean isCheck = true;
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
if (CommonAppContext.getInstance().isLogout){
|
||||
startActivity(new Intent(this, PasswordLoginActivity.class));
|
||||
finish();
|
||||
}
|
||||
super.onCreate(savedInstanceState);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(@Nullable Bundle savedInstanceState, @Nullable PersistableBundle persistentState) {
|
||||
super.onCreate(savedInstanceState, persistentState);
|
||||
|
||||
|
||||
LogUtils.e("4444", "LaunchPageActivity onCreate");
|
||||
// 获取Application实例并设置监听器
|
||||
CommonAppContext app = (CommonAppContext) getApplication();
|
||||
@@ -197,7 +208,6 @@ public class LaunchPageActivity extends BaseMvpActivity<IPresenter, ActivityLaun
|
||||
// 设置gravity来填充整个布局
|
||||
params.gravity = Gravity.FILL;
|
||||
mBinding.container.addView(videoView, params);
|
||||
|
||||
// 设置视频缩放模式为拉伸填充
|
||||
videoView.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
|
||||
@Override
|
||||
@@ -231,7 +241,7 @@ public class LaunchPageActivity extends BaseMvpActivity<IPresenter, ActivityLaun
|
||||
|
||||
// 显示跳过按钮
|
||||
mBinding.btnSkipImg.setVisibility(android.view.View.VISIBLE);
|
||||
|
||||
mp.setVolume(0.1f,0.1f); // 设置音量
|
||||
// 启动进度更新
|
||||
startProgressUpdate(mp, duration);
|
||||
}
|
||||
@@ -240,6 +250,7 @@ public class LaunchPageActivity extends BaseMvpActivity<IPresenter, ActivityLaun
|
||||
// 设置视频路径,从raw资源中
|
||||
String videoPath = "android.resource://" + getPackageName() + "/" + R.raw.app_start;
|
||||
|
||||
|
||||
// 设置播放完成监听器
|
||||
videoView.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
|
||||
@Override
|
||||
@@ -336,7 +347,14 @@ public class LaunchPageActivity extends BaseMvpActivity<IPresenter, ActivityLaun
|
||||
@Override
|
||||
protected void onStop() {
|
||||
super.onStop();
|
||||
setEnter();
|
||||
if (videoView != null) {
|
||||
if (videoView.isPlaying()){
|
||||
videoView.stopPlayback();
|
||||
videoView = null;
|
||||
}
|
||||
}
|
||||
startActivity(new Intent(this, PasswordLoginActivity.class));
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -17,6 +17,7 @@ import android.widget.ImageView;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alipay.sdk.app.AuthTask;
|
||||
import com.blankj.utilcode.util.LogUtils;
|
||||
@@ -40,6 +41,7 @@ import com.xscm.modulemain.activity.main.activity.MainActivity;
|
||||
import com.xscm.moduleutil.base.CommonAppContext;
|
||||
import com.xscm.moduleutil.bean.ThemeBean;
|
||||
import com.xscm.moduleutil.bean.UserBean;
|
||||
import com.xscm.moduleutil.utils.ARouteConstants;
|
||||
import com.xscm.moduleutil.utils.BarUtils;
|
||||
import com.xscm.moduleutil.utils.PreferencesUtils;
|
||||
import com.xscm.moduleutil.utils.logger.Logger;
|
||||
@@ -51,7 +53,6 @@ import org.greenrobot.eventbus.ThreadMode;
|
||||
import java.util.Map;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public class PasswordLoginActivity extends BaseMvpActivity<LoginPresenter, ActivityPasswordLoginBinding> implements LoginContacter.View, View.OnClickListener {
|
||||
|
||||
private CountDownTimer mTimer;
|
||||
@@ -624,6 +625,13 @@ public class PasswordLoginActivity extends BaseMvpActivity<LoginPresenter, Activ
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void authorError() {
|
||||
if (phoneNumberAuthHelper != null){
|
||||
phoneNumberAuthHelper.hideLoginLoading();
|
||||
}
|
||||
}
|
||||
|
||||
private void zfbLogin(String s) {
|
||||
LogUtils.e("@@@",s);
|
||||
CommonAppContext.getInstance();
|
||||
|
||||
Reference in New Issue
Block a user