添加批量换源

pull/1751/head
kunfei 3 years ago
parent dbd3c733ba
commit 9dfb46f4a6
  1. 3
      app/src/main/java/io/legado/app/ui/book/arrange/SourcePickerDialog.kt
  2. 4
      app/src/main/res/layout/dialog_source_picker.xml

@ -16,10 +16,8 @@ import io.legado.app.databinding.ItemTextBinding
import io.legado.app.lib.theme.primaryColor import io.legado.app.lib.theme.primaryColor
import io.legado.app.lib.theme.primaryTextColor import io.legado.app.lib.theme.primaryTextColor
import io.legado.app.utils.applyTint import io.legado.app.utils.applyTint
import io.legado.app.utils.dpToPx
import io.legado.app.utils.setLayout import io.legado.app.utils.setLayout
import io.legado.app.utils.viewbindingdelegate.viewBinding import io.legado.app.utils.viewbindingdelegate.viewBinding
import splitties.views.rightPadding
class SourcePickerDialog : BaseDialogFragment(R.layout.dialog_source_picker) { class SourcePickerDialog : BaseDialogFragment(R.layout.dialog_source_picker) {
@ -43,7 +41,6 @@ class SourcePickerDialog : BaseDialogFragment(R.layout.dialog_source_picker) {
private fun initView() { private fun initView() {
binding.toolBar.setBackgroundColor(primaryColor) binding.toolBar.setBackgroundColor(primaryColor)
binding.toolBar.title = "选择书源" binding.toolBar.title = "选择书源"
binding.toolBar.rightPadding = 16.dpToPx()
binding.recyclerView.layoutManager = LinearLayoutManager(requireContext()) binding.recyclerView.layoutManager = LinearLayoutManager(requireContext())
binding.recyclerView.adapter = adapter binding.recyclerView.adapter = adapter
searchView.applyTint(primaryTextColor) searchView.applyTint(primaryTextColor)

@ -11,11 +11,13 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:theme="?attr/actionBarStyle" android:theme="?attr/actionBarStyle"
android:paddingRight="16dp"
app:attachToActivity="false" app:attachToActivity="false"
app:contentLayout="@layout/view_search" app:contentLayout="@layout/view_search"
app:fitStatusBar="false" app:fitStatusBar="false"
app:popupTheme="@style/AppTheme.PopupOverlay" app:popupTheme="@style/AppTheme.PopupOverlay"
app:titleTextAppearance="@style/ToolbarTitle" /> app:titleTextAppearance="@style/ToolbarTitle"
tools:ignore="RtlHardcoded,RtlSymmetry" />
<FrameLayout <FrameLayout
android:layout_width="match_parent" android:layout_width="match_parent"

Loading…
Cancel
Save