主题适配

pull/300/head
gedoor 4 years ago
parent 0fcf751cc2
commit 2cddd62624
  1. 2
      app/src/main/java/io/legado/app/ui/book/changecover/ChangeCoverDialog.kt
  2. 2
      app/src/main/java/io/legado/app/ui/book/read/config/TocRegexDialog.kt
  3. 1
      app/src/main/res/layout/dialog_toc_regex.xml
  4. 13
      app/src/main/res/xml/pref_config_other.xml

@ -14,6 +14,7 @@ import androidx.recyclerview.widget.GridLayoutManager
import io.legado.app.R
import io.legado.app.base.BaseDialogFragment
import io.legado.app.constant.Theme
import io.legado.app.lib.theme.bottomBackground
import io.legado.app.utils.applyTint
import io.legado.app.utils.getViewModel
import kotlinx.android.synthetic.main.dialog_change_source.*
@ -60,6 +61,7 @@ class ChangeCoverDialog : BaseDialogFragment(),
}
override fun onFragmentCreated(view: View, savedInstanceState: Bundle?) {
tool_bar.setBackgroundColor(bottomBackground)
tool_bar.setTitle(R.string.change_cover_source)
viewModel.initData(arguments)
initMenu()

@ -28,6 +28,7 @@ import io.legado.app.lib.dialogs.alert
import io.legado.app.lib.dialogs.cancelButton
import io.legado.app.lib.dialogs.customView
import io.legado.app.lib.dialogs.okButton
import io.legado.app.lib.theme.bottomBackground
import io.legado.app.ui.widget.recycler.VerticalDivider
import io.legado.app.ui.widget.text.AutoCompleteTextView
import io.legado.app.utils.*
@ -66,6 +67,7 @@ class TocRegexDialog : BaseDialogFragment(), Toolbar.OnMenuItemClickListener {
}
override fun onFragmentCreated(view: View, savedInstanceState: Bundle?) {
tool_bar.setBackgroundColor(bottomBackground)
durRegex = arguments?.getString("tocRegex")
tool_bar.setTitle(R.string.txt_toc_regex)
tool_bar.inflateMenu(R.menu.txt_toc_regex)

@ -13,7 +13,6 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view"
android:background="@color/background_card"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />

@ -4,10 +4,10 @@
<io.legado.app.ui.widget.prefs.PreferenceCategory
android:title="@string/main_activity"
app:layout="@layout/view_preference_category"
app:allowDividerAbove="false"
app:allowDividerBelow="false"
app:iconSpaceReserved="false">
app:iconSpaceReserved="false"
app:layout="@layout/view_preference_category">
<io.legado.app.ui.widget.prefs.SwitchPreference
android:defaultValue="false"
@ -27,23 +27,22 @@
android:defaultValue="true"
android:key="showRss"
android:title="@string/show_rss"
app:allowDividerAbove="false"
app:allowDividerBelow="false"
app:iconSpaceReserved="false" />
<io.legado.app.ui.widget.prefs.Preference
android:key="defaultCover"
android:title="@string/default_cover"
app:allowDividerAbove="false"
app:allowDividerBelow="false"
app:iconSpaceReserved="false" />
</io.legado.app.ui.widget.prefs.PreferenceCategory>
<io.legado.app.ui.widget.prefs.PreferenceCategory
android:title="@string/other_setting"
app:layout="@layout/view_preference_category"
app:allowDividerAbove="true"
app:allowDividerBelow="false"
app:iconSpaceReserved="false">
app:iconSpaceReserved="false"
app:layout="@layout/view_preference_category">
<io.legado.app.ui.widget.prefs.SwitchPreference
android:defaultValue="true"

Loading…
Cancel
Save