feat: 优化代码

pull/123/head
kunfei 5 years ago
parent 4d4e3a09d4
commit afa23f662c
  1. 2
      app/src/main/java/io/legado/app/ui/book/read/ReadMenu.kt
  2. 1
      app/src/main/java/io/legado/app/ui/welcome/WelcomeActivity.kt
  3. 1
      app/src/main/res/layout/view_read_menu.xml

@ -12,6 +12,7 @@ import io.legado.app.App
import io.legado.app.R
import io.legado.app.help.AppConfig
import io.legado.app.help.ReadBookConfig
import io.legado.app.lib.theme.ATH
import io.legado.app.lib.theme.accentColor
import io.legado.app.lib.theme.buttonDisabledColor
import io.legado.app.service.help.ReadBook
@ -48,6 +49,7 @@ class ReadMenu : FrameLayout {
fabNightTheme.setImageResource(R.drawable.ic_brightness)
}
initAnimation()
ATH.applyBackgroundTint(fl_bottom_bg)
vw_bg.onClick { }
vwNavigationBar.onClick { }
seek_brightness.progress = context.getPrefInt("brightness", 100)

@ -20,6 +20,7 @@ open class WelcomeActivity : BaseActivity(R.layout.activity_welcome) {
override fun onActivityCreated(savedInstanceState: Bundle?) {
iv_book.setColorFilter(accentColor)
vw_title_line.setBackgroundColor(accentColor)
// 避免从桌面启动程序后,会重新实例化入口类的activity
if (intent.flags and Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT != 0) {
finish()

@ -147,6 +147,7 @@
<!--底部设置栏-->
<FrameLayout
android:id="@+id/fl_bottom_bg"
android:layout_width="match_parent"
android:layout_height="100dp">

Loading…
Cancel
Save