优化主题

pull/298/head
gedoor 4 years ago
parent 39fc249ea2
commit bdb6f4720d
  1. 7
      app/src/main/java/io/legado/app/ui/book/read/config/PaddingConfigDialog.kt
  2. 2
      app/src/main/java/io/legado/app/ui/book/read/config/PageKeyDialog.kt
  3. 1
      app/src/main/res/layout/dialog_page_key.xml
  4. 1
      app/src/main/res/layout/dialog_read_padding.xml

@ -6,15 +6,15 @@ import android.util.DisplayMetrics
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.DialogFragment
import io.legado.app.R
import io.legado.app.base.BaseDialogFragment
import io.legado.app.constant.EventBus
import io.legado.app.help.ReadBookConfig
import io.legado.app.ui.book.read.Help
import io.legado.app.utils.postEvent
import kotlinx.android.synthetic.main.dialog_read_padding.*
class PaddingConfigDialog : DialogFragment() {
class PaddingConfigDialog : BaseDialogFragment() {
override fun onStart() {
super.onStart()
@ -39,8 +39,7 @@ class PaddingConfigDialog : DialogFragment() {
return inflater.inflate(R.layout.dialog_read_padding, container)
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
override fun onFragmentCreated(view: View, savedInstanceState: Bundle?) {
initData()
initView()
}

@ -5,6 +5,7 @@ import android.content.Context
import android.view.KeyEvent
import io.legado.app.R
import io.legado.app.constant.PreferKey
import io.legado.app.lib.theme.backgroundColor
import io.legado.app.utils.getPrefInt
import io.legado.app.utils.hideSoftInput
import io.legado.app.utils.putPrefInt
@ -17,6 +18,7 @@ class PageKeyDialog(context: Context) : Dialog(context, R.style.AppTheme_AlertDi
init {
setContentView(R.layout.dialog_page_key)
content_view.setBackgroundColor(context.backgroundColor)
et_prev.setText(context.getPrefInt(PreferKey.prevKey).toString())
et_next.setText(context.getPrefInt(PreferKey.nextKey).toString())
tv_ok.onClick {

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/content_view"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"

@ -3,7 +3,6 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/background"
android:padding="10dp"
android:orientation="vertical">

Loading…
Cancel
Save