diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 5d5b115af..d1f545692 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -199,47 +199,15 @@
-
-
-
-
-
-
-
-
-
+ android:launchMode="singleTop" />
-
-
-
-
-
-
-
-
-
+ android:launchMode="singleTop" />
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/java/io/legado/app/base/BaseActivity.kt b/app/src/main/java/io/legado/app/base/BaseActivity.kt
index 7a7d8a6a8..e0de2b618 100644
--- a/app/src/main/java/io/legado/app/base/BaseActivity.kt
+++ b/app/src/main/java/io/legado/app/base/BaseActivity.kt
@@ -24,7 +24,8 @@ import kotlinx.coroutines.cancel
abstract class BaseActivity(
private val layoutID: Int,
private val fullScreen: Boolean = true,
- private val theme: Theme = Theme.Auto
+ private val theme: Theme = Theme.Auto,
+ private val transparent: Boolean = false
) : AppCompatActivity(),
CoroutineScope by MainScope() {
@@ -92,14 +93,23 @@ abstract class BaseActivity(
}
private fun initTheme() {
- ATH.applyBackgroundTint(window.decorView)
when (theme) {
- Theme.Dark -> setTheme(R.style.AppTheme_Dark)
- Theme.Light -> setTheme(R.style.AppTheme_Light)
- else -> if (ColorUtils.isColorLight(primaryColor)) {
- setTheme(R.style.AppTheme_Light)
- } else {
+ Theme.Transparent -> setTheme(R.style.AppTheme_Transparent)
+ Theme.Dark -> {
setTheme(R.style.AppTheme_Dark)
+ ATH.applyBackgroundTint(window.decorView)
+ }
+ Theme.Light -> {
+ setTheme(R.style.AppTheme_Light)
+ ATH.applyBackgroundTint(window.decorView)
+ }
+ else -> {
+ if (ColorUtils.isColorLight(primaryColor)) {
+ setTheme(R.style.AppTheme_Light)
+ } else {
+ setTheme(R.style.AppTheme_Dark)
+ }
+ ATH.applyBackgroundTint(window.decorView)
}
}
}
diff --git a/app/src/main/java/io/legado/app/constant/Theme.kt b/app/src/main/java/io/legado/app/constant/Theme.kt
index b8587997b..a4f313a80 100644
--- a/app/src/main/java/io/legado/app/constant/Theme.kt
+++ b/app/src/main/java/io/legado/app/constant/Theme.kt
@@ -3,7 +3,7 @@ package io.legado.app.constant
import io.legado.app.help.AppConfig
enum class Theme {
- Dark, Light, Auto;
+ Dark, Light, Auto, Transparent;
companion object {
fun getTheme(): Theme {
diff --git a/app/src/main/java/io/legado/app/help/storage/ImportOldData.kt b/app/src/main/java/io/legado/app/help/storage/ImportOldData.kt
index da769dbe2..a1741c845 100644
--- a/app/src/main/java/io/legado/app/help/storage/ImportOldData.kt
+++ b/app/src/main/java/io/legado/app/help/storage/ImportOldData.kt
@@ -5,7 +5,6 @@ import android.net.Uri
import androidx.documentfile.provider.DocumentFile
import io.legado.app.App
import io.legado.app.data.entities.BookSource
-import io.legado.app.data.entities.ReplaceRule
import io.legado.app.utils.DocumentUtils
import io.legado.app.utils.FileUtils
import org.jetbrains.anko.toast
@@ -102,17 +101,8 @@ object ImportOldData {
}
fun importOldReplaceRule(json: String): Int {
- val replaceRules = mutableListOf()
- val items: List