Commit fc316c45 authored by jyx's avatar jyx

更新切换开屏逻辑

parent fb63d148
......@@ -75,6 +75,7 @@
android:name=".ui.activitys.SplashActivity"
android:configChanges="orientation|screenSize|keyboardHidden"
android:exported="true"
android:launchMode="singleTask"
android:theme="@style/AppTheme.TranslucentSplash">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
......
package com.duben.dayplaylet.ui.activitys
import android.annotation.SuppressLint
import android.content.Intent
import android.os.Bundle
import android.os.Handler
import android.os.Looper
import android.view.KeyEvent
import android.view.View
import com.duben.dayplaylet.R
......@@ -10,6 +13,7 @@ import com.duben.dayplaylet.ad.splash.SplashManager
import com.duben.dayplaylet.common.Constant
import com.duben.dayplaylet.common.Constant.PRIVACY_URL
import com.duben.dayplaylet.common.Constant.REGISTER_URL
import com.duben.dayplaylet.manager.ActivityPageManager
import com.duben.dayplaylet.manager.TrackManager
import com.duben.dayplaylet.ui.activitys.base.BaseActivity
import com.duben.dayplaylet.ui.widgets.CycleProgress
......@@ -42,6 +46,15 @@ class SplashActivity : BaseActivity() {
override fun initViewsAndEvents() {
if (!isTaskRoot) {
Handler(Looper.getMainLooper()).postDelayed({
val intent = Intent(
ActivityPageManager.getInstance().currentActivity,
SplashBackActivity::class.java
)
startActivity(intent)
}, 2000)
//点击Home键后再点击App图标,会回到原来的界面。今天重新打包后,但是在Debug模式下,一切正常,
// 但是把打完包的apk(Release)安装在其他手机上时,回到桌面后点击图标会重新打开启动页
finish()
......
......@@ -107,7 +107,7 @@ public class ForegroundOrBackground implements Application.ActivityLifecycleCall
AppConfig.alipayBackFalg = false;
}
} else {
activity.startActivity(new Intent(activity, SplashBackActivity.class));
// activity.startActivity(new Intent(activity, SplashBackActivity.class));
}
// }
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment