pull/32/head
GKF 6 years ago
parent fee4fb1f71
commit 57a43b363f
  1. 8
      app/src/main/java/io/legado/app/base/BaseActivity.kt
  2. 2
      app/src/main/res/values/colors.xml
  3. 2
      app/src/main/res/xml/pref_config_theme.xml

@ -11,6 +11,8 @@ import androidx.lifecycle.ViewModel
import io.legado.app.R
import io.legado.app.lib.theme.ColorUtils
import io.legado.app.lib.theme.ThemeStore
import io.legado.app.utils.getCompatColor
import io.legado.app.utils.getPrefBoolean
import io.legado.app.utils.setIconColor
@ -69,6 +71,10 @@ abstract class BaseActivity<VM : ViewModel> : AppCompatActivity() {
window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS or WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION)
window.decorView.systemUiVisibility = View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN or View.SYSTEM_UI_FLAG_LAYOUT_STABLE
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS)
window.statusBarColor = Color.TRANSPARENT
if (getPrefBoolean("transparentStatusBar", false)) {
window.statusBarColor = Color.TRANSPARENT
} else {
window.statusBarColor = getCompatColor(R.color.status_bar_bag)
}
}
}

@ -44,7 +44,7 @@
<!-- 分格线背景色 -->
<color name="bg_divider_line">#FFD4D4D4</color>
<!--statusBarBackground-->
<color name="status_bar_bag">#64000000</color>
<color name="status_bar_bag">#4D000000</color>
<color name="navigation_bar_bag">#f4f4f4</color>
<!--base-color-->

@ -6,7 +6,7 @@
<io.legado.app.lib.theme.prefs.ATESwitchPreference
android:defaultValue="false"
android:key="immersionStatusBar"
android:key="transparentStatusBar"
android:summary="@string/status_bar_immersion"
android:title="@string/immersion_status_bar"
app:iconSpaceReserved="false"/>

Loading…
Cancel
Save