diff --git a/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeUrl.kt b/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeUrl.kt
index 3c75a20b3..1a1077da0 100644
--- a/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeUrl.kt
+++ b/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeUrl.kt
@@ -3,6 +3,8 @@ package io.legado.app.model.analyzeRule
import android.annotation.SuppressLint
import android.text.TextUtils
import androidx.annotation.Keep
+import com.bumptech.glide.load.model.GlideUrl
+import com.bumptech.glide.load.model.LazyHeaders
import io.legado.app.constant.AppConst.SCRIPT_ENGINE
import io.legado.app.constant.AppConst.UA_NAME
import io.legado.app.constant.AppConst.userAgent
@@ -22,8 +24,6 @@ import java.net.URLEncoder
import java.util.*
import java.util.regex.Pattern
import javax.script.SimpleBindings
-import com.bumptech.glide.load.model.GlideUrl
-import com.bumptech.glide.load.model.LazyHeaders
/**
* Created by GKF on 2018/1/24.
@@ -394,11 +394,11 @@ class AnalyzeUrl(
fun getGlideUrl(): Any? {
var glideUrl: Any = url
if(headerMap.isNotEmpty()) {
- val Headers = LazyHeaders.Builder()
- headerMap.forEach {(key, value) ->
- Headers.addHeader(key, value)
+ val headers = LazyHeaders.Builder()
+ headerMap.forEach {(key, value) ->
+ headers.addHeader(key, value)
}
- glideUrl = GlideUrl(url, Headers.build())
+ glideUrl = GlideUrl(url, headers.build())
}
return glideUrl
}
diff --git a/app/src/main/java/io/legado/app/ui/filechooser/FileChooserDialog.kt b/app/src/main/java/io/legado/app/ui/filechooser/FileChooserDialog.kt
index f1e6a7bc9..fb2e5ac19 100644
--- a/app/src/main/java/io/legado/app/ui/filechooser/FileChooserDialog.kt
+++ b/app/src/main/java/io/legado/app/ui/filechooser/FileChooserDialog.kt
@@ -12,7 +12,7 @@ import androidx.fragment.app.FragmentManager
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import io.legado.app.R
-import io.legado.app.constant.Theme
+import io.legado.app.lib.theme.primaryColor
import io.legado.app.ui.filechooser.adapter.FileAdapter
import io.legado.app.ui.filechooser.adapter.PathAdapter
import io.legado.app.ui.widget.recycler.VerticalDivider
@@ -93,6 +93,7 @@ class FileChooserDialog : DialogFragment(),
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
+ tool_bar.setBackgroundColor(primaryColor)
view.setBackgroundResource(R.color.background_card)
arguments?.let {
requestCode = it.getInt("requestCode")
@@ -129,7 +130,7 @@ class FileChooserDialog : DialogFragment(),
tool_bar.menu.add(menuTitle)
}
}
- tool_bar.menu.applyTint(requireContext(), Theme.getTheme())
+ tool_bar.menu.applyTint(requireContext())
tool_bar.setOnMenuItemClickListener(this)
}
diff --git a/app/src/main/java/io/legado/app/ui/replacerule/edit/ReplaceEditDialog.kt b/app/src/main/java/io/legado/app/ui/replacerule/edit/ReplaceEditDialog.kt
index 1ee635f56..4bbfb44be 100644
--- a/app/src/main/java/io/legado/app/ui/replacerule/edit/ReplaceEditDialog.kt
+++ b/app/src/main/java/io/legado/app/ui/replacerule/edit/ReplaceEditDialog.kt
@@ -15,7 +15,7 @@ import io.legado.app.R
import io.legado.app.base.BaseDialogFragment
import io.legado.app.constant.AppConst
import io.legado.app.data.entities.ReplaceRule
-import io.legado.app.lib.theme.bottomBackground
+import io.legado.app.lib.theme.primaryColor
import io.legado.app.ui.widget.KeyboardToolPop
import io.legado.app.utils.applyTint
import io.legado.app.utils.getViewModel
@@ -65,7 +65,7 @@ class ReplaceEditDialog : BaseDialogFragment(),
}
override fun onFragmentCreated(view: View, savedInstanceState: Bundle?) {
- tool_bar.setBackgroundColor(bottomBackground)
+ tool_bar.setBackgroundColor(primaryColor)
mSoftKeyboardTool = KeyboardToolPop(requireContext(), AppConst.keyboardToolChars, this)
tool_bar.inflateMenu(R.menu.replace_edit)
tool_bar.menu.applyTint(requireContext())
diff --git a/app/src/main/java/io/legado/app/ui/widget/font/FontSelectDialog.kt b/app/src/main/java/io/legado/app/ui/widget/font/FontSelectDialog.kt
index 57611e8ad..b10371864 100644
--- a/app/src/main/java/io/legado/app/ui/widget/font/FontSelectDialog.kt
+++ b/app/src/main/java/io/legado/app/ui/widget/font/FontSelectDialog.kt
@@ -22,7 +22,7 @@ import io.legado.app.help.AppConfig
import io.legado.app.help.permission.Permissions
import io.legado.app.help.permission.PermissionsCompat
import io.legado.app.lib.dialogs.alert
-import io.legado.app.lib.theme.bottomBackground
+import io.legado.app.lib.theme.primaryColor
import io.legado.app.ui.filechooser.FileChooserDialog
import io.legado.app.ui.filechooser.FilePicker
import io.legado.app.utils.*
@@ -59,9 +59,10 @@ class FontSelectDialog : BaseDialogFragment(),
}
override fun onFragmentCreated(view: View, savedInstanceState: Bundle?) {
- tool_bar.setBackgroundColor(requireContext().bottomBackground)
+ tool_bar.setBackgroundColor(primaryColor)
tool_bar.setTitle(R.string.select_font)
tool_bar.inflateMenu(R.menu.font_select)
+ tool_bar.menu.applyTint(requireContext())
tool_bar.setOnMenuItemClickListener(this)
adapter = FontAdapter(requireContext(), this)
recycler_view.layoutManager = LinearLayoutManager(context)
diff --git a/app/src/main/res/layout/dialog_file_chooser.xml b/app/src/main/res/layout/dialog_file_chooser.xml
index 7615ba752..efe1db737 100644
--- a/app/src/main/res/layout/dialog_file_chooser.xml
+++ b/app/src/main/res/layout/dialog_file_chooser.xml
@@ -1,5 +1,6 @@
+ android:layout_height="wrap_content"
+ android:theme="?attr/actionBarStyle"
+ app:titleTextAppearance="@style/ToolbarTitle"
+ app:popupTheme="@style/AppTheme.PopupOverlay" />
+ android:layout_height="wrap_content"
+ android:theme="?attr/actionBarStyle"
+ app:titleTextAppearance="@style/ToolbarTitle"
+ app:popupTheme="@style/AppTheme.PopupOverlay" />