Update UI

This commit is contained in:
HapeLee
2025-06-03 03:02:00 +08:00
parent 96d2d65511
commit 63a3dfafbc
51 changed files with 437 additions and 457 deletions
@@ -157,7 +157,7 @@ internal class AndroidAlertBuilder(override val ctx: Context) : AlertBuilder<Ale
} }
override fun show(): AlertDialog { override fun show(): AlertDialog {
var dialog = builder.show().applyTint() var dialog = builder.show()
if (AppConfig.isEInkMode) { if (AppConfig.isEInkMode) {
dialog.window?.run { dialog.window?.run {
val attr = attributes val attr = attributes
@@ -435,7 +435,6 @@ class ReadMenu @JvmOverloads constructor(
} }
}) })
//搜索 //搜索
fabSearch.setOnClickListener { fabSearch.setOnClickListener {
runMenuOut { runMenuOut {
@@ -8,6 +8,7 @@ import android.view.ViewGroup
import androidx.appcompat.widget.Toolbar import androidx.appcompat.widget.Toolbar
import androidx.fragment.app.viewModels import androidx.fragment.app.viewModels
import io.legado.app.R import io.legado.app.R
import io.legado.app.base.BaseBottomSheetDialogFragment
import io.legado.app.base.BaseDialogFragment import io.legado.app.base.BaseDialogFragment
import io.legado.app.base.BaseViewModel import io.legado.app.base.BaseViewModel
import io.legado.app.constant.AppLog import io.legado.app.constant.AppLog
@@ -22,7 +23,7 @@ import kotlinx.coroutines.Dispatchers
import java.util.regex.Pattern import java.util.regex.Pattern
import java.util.regex.PatternSyntaxException import java.util.regex.PatternSyntaxException
class TxtTocRuleEditDialog() : BaseDialogFragment(R.layout.dialog_toc_regex_edit, true), class TxtTocRuleEditDialog() : BaseBottomSheetDialogFragment(R.layout.dialog_toc_regex_edit),
Toolbar.OnMenuItemClickListener { Toolbar.OnMenuItemClickListener {
constructor(id: Long?) : this() { constructor(id: Long?) : this() {
@@ -9,6 +9,7 @@ import androidx.appcompat.widget.Toolbar
import androidx.fragment.app.viewModels import androidx.fragment.app.viewModels
import io.legado.app.R import io.legado.app.R
import io.legado.app.base.BaseBottomSheetDialogFragment
import io.legado.app.base.BaseDialogFragment import io.legado.app.base.BaseDialogFragment
import io.legado.app.base.BaseViewModel import io.legado.app.base.BaseViewModel
import io.legado.app.data.appDb import io.legado.app.data.appDb
@@ -18,7 +19,7 @@ import io.legado.app.databinding.DialogDictRuleEditBinding
import io.legado.app.utils.* import io.legado.app.utils.*
import io.legado.app.utils.viewbindingdelegate.viewBinding import io.legado.app.utils.viewbindingdelegate.viewBinding
class DictRuleEditDialog() : BaseDialogFragment(R.layout.dialog_dict_rule_edit, true), class DictRuleEditDialog() : BaseBottomSheetDialogFragment(R.layout.dialog_dict_rule_edit),
Toolbar.OnMenuItemClickListener { Toolbar.OnMenuItemClickListener {
val viewModel by viewModels<DictRuleEditViewModel>() val viewModel by viewModels<DictRuleEditViewModel>()
@@ -5,10 +5,12 @@ import android.content.DialogInterface
import android.content.Intent import android.content.Intent
import android.net.Uri import android.net.Uri
import android.os.Bundle import android.os.Bundle
import android.util.TypedValue
import android.view.MenuItem import android.view.MenuItem
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import androidx.appcompat.widget.Toolbar import androidx.appcompat.widget.Toolbar
import androidx.core.content.ContextCompat
import androidx.core.content.res.ResourcesCompat import androidx.core.content.res.ResourcesCompat
import androidx.core.graphics.drawable.DrawableCompat import androidx.core.graphics.drawable.DrawableCompat
import androidx.fragment.app.FragmentManager import androidx.fragment.app.FragmentManager
@@ -165,7 +167,7 @@ class FilePickerDialog : BaseDialogFragment(R.layout.dialog_file_chooser),
inner class PathAdapter : inner class PathAdapter :
RecyclerAdapter<File, ItemPathPickerBinding>(requireContext()) { RecyclerAdapter<File, ItemPathPickerBinding>(requireContext()) {
private val arrowIcon = ConvertUtils.toDrawable(FilePickerIcon.getArrow()) private val arrowIcon = ContextCompat.getDrawable(requireContext(),R.drawable.ic_arrow_right)
init { init {
addHeaderView { addHeaderView {
@@ -207,14 +209,16 @@ class FilePickerDialog : BaseDialogFragment(R.layout.dialog_file_chooser),
} }
inner class FileAdapter : RecyclerAdapter<File, ItemFilePickerBinding>(requireContext()) { inner class FileAdapter : RecyclerAdapter<File, ItemFilePickerBinding>(requireContext()) {
//private val primaryTextColor = context.getPrimaryTextColor(!AppConfig.isNightTheme) private val upIcon = ContextCompat.getDrawable(requireContext(),R.drawable.ic_return)
//private val disabledTextColor = context.getPrimaryDisabledTextColor(!AppConfig.isNightTheme) private val folderIcon = ContextCompat.getDrawable(requireContext(),R.drawable.ic_folder)
private val upIcon = ConvertUtils.toDrawable(FilePickerIcon.getUpDir())!! private val fileIcon = ContextCompat.getDrawable(requireContext(),R.drawable.ic_file)
private val folderIcon = ConvertUtils.toDrawable(FilePickerIcon.getFolder())!!
private val fileIcon = ConvertUtils.toDrawable(FilePickerIcon.getFile())!!
private val selectDrawable = private val selectDrawable =
ResourcesCompat.getDrawable(resources, R.drawable.shape_radius_1dp, null)!!.apply { ResourcesCompat.getDrawable(resources, R.drawable.shape_radius_1dp, null)!!.apply {
//DrawableCompat.setTint(this, primaryTextColor) // 从主题获取颜色
val typedValue = TypedValue()
requireContext().theme.resolveAttribute(android.R.attr.colorPrimary, typedValue, true)
val primaryColor = typedValue.data
DrawableCompat.setTint(this, primaryColor)
} }
var selectFile: File? = null var selectFile: File? = null
@@ -2,6 +2,7 @@ package io.legado.app.ui.main.bookshelf.style1.books
import android.content.Context import android.content.Context
import android.os.Bundle import android.os.Bundle
import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import io.legado.app.base.adapter.ItemViewHolder import io.legado.app.base.adapter.ItemViewHolder
import io.legado.app.data.entities.Book import io.legado.app.data.entities.Book
@@ -44,32 +45,36 @@ class BooksAdapterGrid(context: Context, private val callBack: CallBack) :
private fun upRefresh(binding: ItemBookshelfGridBinding, item: Book) { private fun upRefresh(binding: ItemBookshelfGridBinding, item: Book) {
if (!item.isLocal && callBack.isUpdate(item.bookUrl)) { if (!item.isLocal && callBack.isUpdate(item.bookUrl)) {
binding.bvUnread.invisible() binding.cdUnread.visibility = View.GONE
binding.rlLoading.visible() binding.rlLoading.visibility = View.VISIBLE
} else { } else {
binding.rlLoading.inVisible() binding.rlLoading.visibility = View.GONE
if (AppConfig.showUnread) { if (AppConfig.showUnread) {
binding.bvUnread.setBadgeCount(item.getUnreadChapterNum()) val unreadCount = item.getUnreadChapterNum()
binding.bvUnread.setHighlight(item.lastCheckCount > 0) if (unreadCount > 0) {
binding.cdUnread.visibility = View.VISIBLE
binding.tvUnread.text = unreadCount.toString()
} else {
binding.cdUnread.visibility = View.GONE
}
} else { } else {
binding.bvUnread.invisible() binding.cdUnread.visibility = View.GONE
} }
} }
} }
override fun registerListener(holder: ItemViewHolder, binding: ItemBookshelfGridBinding) { override fun registerListener(holder: ItemViewHolder, binding: ItemBookshelfGridBinding) {
holder.itemView.apply { binding.cvContent.setOnClickListener {
setOnClickListener { getItem(holder.layoutPosition)?.let {
getItem(holder.layoutPosition)?.let { callBack.open(it)
callBack.open(it)
}
} }
}
onLongClick { binding.cvContent.setOnLongClickListener {
getItem(holder.layoutPosition)?.let { getItem(holder.layoutPosition)?.let {
callBack.openBookInfo(it) callBack.openBookInfo(it)
}
} }
true
} }
} }
} }
@@ -2,6 +2,7 @@ package io.legado.app.ui.main.bookshelf.style2
import android.content.Context import android.content.Context
import android.os.Bundle import android.os.Bundle
import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import io.legado.app.data.entities.Book import io.legado.app.data.entities.Book
@@ -89,19 +90,25 @@ class BooksAdapterGrid(context: Context, callBack: CallBack) :
private fun upRefresh(binding: ItemBookshelfGridBinding, item: Book) { private fun upRefresh(binding: ItemBookshelfGridBinding, item: Book) {
if (!item.isLocal && callBack.isUpdate(item.bookUrl)) { if (!item.isLocal && callBack.isUpdate(item.bookUrl)) {
binding.bvUnread.invisible() binding.cdUnread.visibility = View.GONE
binding.rlLoading.visible() binding.rlLoading.visibility = View.VISIBLE
} else { } else {
binding.rlLoading.inVisible() binding.rlLoading.visibility = View.GONE
if (AppConfig.showUnread) { if (AppConfig.showUnread) {
binding.bvUnread.setBadgeCount(item.getUnreadChapterNum()) val unreadCount = item.getUnreadChapterNum()
binding.bvUnread.setHighlight(item.lastCheckCount > 0) if (unreadCount > 0) {
binding.cdUnread.visibility = View.VISIBLE
binding.tvUnread.text = unreadCount.toString()
} else {
binding.cdUnread.visibility = View.GONE
}
} else { } else {
binding.bvUnread.invisible() binding.cdUnread.visibility = View.GONE
} }
} }
} }
} }
inner class GroupViewHolder(val binding: ItemBookshelfGridGroupBinding) : inner class GroupViewHolder(val binding: ItemBookshelfGridGroupBinding) :
@@ -129,10 +136,10 @@ class BooksAdapterGrid(context: Context, callBack: CallBack) :
} }
fun registerListener(item: Any) { fun registerListener(item: Any) {
binding.root.setOnClickListener { binding.cvContent.setOnClickListener {
callBack.onItemClick(item) callBack.onItemClick(item)
} }
binding.root.onLongClick { binding.cvContent.onLongClick {
callBack.onItemLongClick(item) callBack.onItemLongClick(item)
} }
} }
@@ -11,6 +11,7 @@ import androidx.fragment.app.activityViewModels
import androidx.lifecycle.lifecycleScope import androidx.lifecycle.lifecycleScope
import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearLayoutManager
import io.legado.app.R import io.legado.app.R
import io.legado.app.base.BaseBottomSheetDialogFragment
import io.legado.app.base.BaseDialogFragment import io.legado.app.base.BaseDialogFragment
import io.legado.app.base.adapter.ItemViewHolder import io.legado.app.base.adapter.ItemViewHolder
import io.legado.app.base.adapter.RecyclerAdapter import io.legado.app.base.adapter.RecyclerAdapter
@@ -32,7 +33,7 @@ import kotlinx.coroutines.flow.conflate
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
class GroupManageDialog : BaseDialogFragment(R.layout.dialog_recycler_view), class GroupManageDialog : BaseBottomSheetDialogFragment(R.layout.dialog_recycler_view),
Toolbar.OnMenuItemClickListener { Toolbar.OnMenuItemClickListener {
private val viewModel: RssSourceViewModel by activityViewModels() private val viewModel: RssSourceViewModel by activityViewModels()
@@ -41,7 +42,7 @@ class GroupManageDialog : BaseDialogFragment(R.layout.dialog_recycler_view),
override fun onStart() { override fun onStart() {
super.onStart() super.onStart()
setLayout(0.9f, 0.9f)
} }
override fun onFragmentCreated(view: View, savedInstanceState: Bundle?) = binding.run { override fun onFragmentCreated(view: View, savedInstanceState: Bundle?) = binding.run {
@@ -1,9 +1,13 @@
package io.legado.app.ui.widget package io.legado.app.ui.widget
import android.content.Context import android.content.Context
import android.os.Build
import android.util.AttributeSet import android.util.AttributeSet
import android.widget.LinearLayout import android.widget.LinearLayout
import android.widget.TextView import android.widget.TextView
import androidx.annotation.RequiresApi
import com.google.android.material.chip.Chip
import com.google.android.material.chip.ChipGroup
import io.legado.app.ui.widget.text.AccentBgTextView import io.legado.app.ui.widget.text.AccentBgTextView
import io.legado.app.utils.dpToPx import io.legado.app.utils.dpToPx
@@ -11,19 +15,19 @@ import io.legado.app.utils.dpToPx
class LabelsBar @JvmOverloads constructor( class LabelsBar @JvmOverloads constructor(
context: Context, context: Context,
attrs: AttributeSet? = null attrs: AttributeSet? = null
) : LinearLayout(context, attrs) { ) : ChipGroup(context, attrs) {
private val unUsedViews = arrayListOf<TextView>() private val unUsedChips = arrayListOf<Chip>()
private val usedViews = arrayListOf<TextView>() private val usedChips = arrayListOf<Chip>()
var textSize = 12f //var textSizeSp = 12f
fun setLabels(labels: Array<String>) { init {
clear() // isSingleLine = false
labels.forEach { // chipSpacingHorizontal = 8.dpToPx()
addLabel(it) // chipSpacingVertical = 4.dpToPx()
}
} }
@RequiresApi(Build.VERSION_CODES.VANILLA_ICE_CREAM)
fun setLabels(labels: List<String>) { fun setLabels(labels: List<String>) {
clear() clear()
labels.forEach { labels.forEach {
@@ -31,32 +35,32 @@ class LabelsBar @JvmOverloads constructor(
} }
} }
@RequiresApi(Build.VERSION_CODES.VANILLA_ICE_CREAM)
fun setLabels(labels: Array<String>) {
setLabels(labels.toList())
}
fun clear() { fun clear() {
unUsedViews.addAll(usedViews) unUsedChips.addAll(usedChips)
usedViews.clear() usedChips.clear()
removeAllViews() removeAllViews()
} }
@RequiresApi(Build.VERSION_CODES.VANILLA_ICE_CREAM)
fun addLabel(label: String) { fun addLabel(label: String) {
val tv = if (unUsedViews.isEmpty()) { val chip = if (unUsedChips.isEmpty()) {
AccentBgTextView(context, null).apply { Chip(context).apply {
setPadding(3.dpToPx(), 0, 3.dpToPx(), 0) isClickable = false
//setRadius(2) isCheckable = false
val lp = LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT) chipStartPadding = 8f
lp.setMargins(0, 0, 2.dpToPx(), 0) chipEndPadding = 8f
layoutParams = lp chipStrokeWidth = 0f
text = label usedChips.add(this)
maxLines = 1
usedViews.add(this)
} }
} else { } else {
unUsedViews.last().apply { unUsedChips.removeLast().also { usedChips.add(it) }
usedViews.add(this)
unUsedViews.removeAt(unUsedViews.lastIndex)
}
} }
tv.textSize = textSize chip.text = label
tv.text = label addView(chip)
addView(tv)
} }
} }
@@ -81,22 +81,26 @@ class CoverImageView @JvmOverloads constructor(
) )
} }
private val cornerRadius = 24f
override fun onLayout(changed: Boolean, left: Int, top: Int, right: Int, bottom: Int) { override fun onLayout(changed: Boolean, left: Int, top: Int, right: Int, bottom: Int) {
super.onLayout(changed, left, top, right, bottom) super.onLayout(changed, left, top, right, bottom)
viewWidth = width.toFloat() viewWidth = width.toFloat()
viewHeight = height.toFloat() viewHeight = height.toFloat()
filletPath.reset() filletPath.reset()
if (width > 10 && viewHeight > 10) {
if (viewWidth > cornerRadius * 2 && viewHeight > cornerRadius * 2) {
val r = cornerRadius
filletPath.apply { filletPath.apply {
moveTo(12f, 0f) moveTo(r, 0f)
lineTo(viewWidth - 12, 0f) lineTo(viewWidth - r, 0f)
quadTo(viewWidth, 0f, viewWidth, 12f) quadTo(viewWidth, 0f, viewWidth, r)
lineTo(viewWidth, viewHeight - 12) lineTo(viewWidth, viewHeight - r)
quadTo(viewWidth, viewHeight, viewWidth - 12, viewHeight) quadTo(viewWidth, viewHeight, viewWidth - r, viewHeight)
lineTo(12f, viewHeight) lineTo(r, viewHeight)
quadTo(0f, viewHeight, 0f, viewHeight - 12) quadTo(0f, viewHeight, 0f, viewHeight - r)
lineTo(0f, 12f) lineTo(0f, r)
quadTo(0f, 0f, 12f, 0f) quadTo(0f, 0f, r, 0f)
close() close()
} }
} }
@@ -14,5 +14,4 @@ class TextInputLayout(context: Context, attrs: AttributeSet?) : TextInputLayout(
Selector.colorBuild().setDefaultColor(ThemeStore.accentColor(context)).create() Selector.colorBuild().setDefaultColor(ThemeStore.accentColor(context)).create()
} }
} }
} }
@@ -4,6 +4,6 @@
<gradient <gradient
android:angle="270" android:angle="270"
android:startColor="@android:color/transparent" android:startColor="@android:color/transparent"
android:endColor="@color/white" android:endColor="@color/background_theme"
android:type="linear" /> android:type="linear" />
</shape> </shape>
+2 -8
View File
@@ -1,9 +1,3 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960" android:tint="?attr/colorControlNormal">
android:width="64dp" <path android:fillColor="@android:color/white" android:pathData="M480,616L240,376L296,320L480,504L664,320L720,376L480,616Z"/>
android:height="64dp"
android:viewportWidth="1024"
android:viewportHeight="1024">
<path
android:pathData="M512,685.25l-278.62,-278.62 45.25,-45.25L512,594.75l233.38,-233.38 45.25,45.25z"
android:fillColor="#181818"/>
</vector> </vector>
@@ -1,9 +1,3 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960" android:tint="?attr/colorControlNormal">
android:width="24dp" <path android:fillColor="@android:color/white" android:pathData="M480,600L280,400L680,400L480,600Z"/>
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M7,10l5,5 5,-5z" />
</vector> </vector>
@@ -1,9 +1,3 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960" android:tint="?attr/colorControlNormal">
android:width="24dp" <path android:fillColor="@android:color/white" android:pathData="M280,560L480,360L680,560L280,560Z"/>
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M7,14l5,-5 5,5z" />
</vector> </vector>
+2 -8
View File
@@ -1,9 +1,3 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960" android:tint="?attr/colorControlNormal" android:autoMirrored="true">
android:width="64dp" <path android:fillColor="@android:color/white" android:pathData="M504,480L320,296L376,240L616,480L376,720L320,664L504,480Z"/>
android:height="64dp"
android:viewportWidth="1024"
android:viewportHeight="1024">
<path
android:pathData="M434.94,790.62l-45.25,-45.25L623.04,512l-233.38,-233.38 45.25,-45.25L713.57,512z"
android:fillColor="#181818"/>
</vector> </vector>
@@ -1,10 +1,3 @@
<vector android:height="24dp" <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960" android:tint="?attr/colorControlNormal">
android:tint="#000000" <path android:fillColor="@android:color/white" android:pathData="M560,640L640,640L640,560L720,560L720,480L640,480L640,400L560,400L560,480L480,480L480,560L560,560L560,640ZM160,800Q127,800 103.5,776.5Q80,753 80,720L80,240Q80,207 103.5,183.5Q127,160 160,160L400,160L480,240L800,240Q833,240 856.5,263.5Q880,287 880,320L880,720Q880,753 856.5,776.5Q833,800 800,800L160,800ZM160,720L800,720Q800,720 800,720Q800,720 800,720L800,320Q800,320 800,320Q800,320 800,320L447,320L367,240L160,240Q160,240 160,240Q160,240 160,240L160,720Q160,720 160,720Q160,720 160,720ZM160,720Q160,720 160,720Q160,720 160,720L160,240Q160,240 160,240Q160,240 160,240L160,240L160,320L160,320Q160,320 160,320Q160,320 160,320L160,720Q160,720 160,720Q160,720 160,720Z"/>
android:viewportHeight="24"
android:viewportWidth="24"
android:width="24dp"
xmlns:android="http://schemas.android.com/apk/res/android">
<path
android:fillColor="@android:color/white"
android:pathData="M20,6h-8l-2,-2L4,4c-1.11,0 -1.99,0.89 -1.99,2L2,18c0,1.11 0.89,2 2,2h16c1.11,0 2,-0.89 2,-2L22,8c0,-1.11 -0.89,-2 -2,-2zM20,18L4,18L4,6h5.17l2,2L20,8v10zM12,14h2v2h2v-2h2v-2h-2v-2h-2v2h-2z" />
</vector> </vector>
+4
View File
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960" android:tint="?attr/colorControlNormal" android:autoMirrored="true">
<path android:fillColor="@android:color/white" android:pathData="M240,880Q207,880 183.5,856.5Q160,833 160,800L160,160Q160,127 183.5,103.5Q207,80 240,80L560,80L800,320L800,800Q800,833 776.5,856.5Q753,880 720,880L240,880ZM520,360L520,160L240,160Q240,160 240,160Q240,160 240,160L240,800Q240,800 240,800Q240,800 240,800L720,800Q720,800 720,800Q720,800 720,800L720,360L520,360ZM240,160L240,160L240,360L240,360L240,160L240,360L240,360L240,800Q240,800 240,800Q240,800 240,800L240,800Q240,800 240,800Q240,800 240,800L240,160Q240,160 240,160Q240,160 240,160Z"/>
</vector>
+2 -9
View File
@@ -1,10 +1,3 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960" android:tint="?attr/colorControlNormal">
android:width="24dp" <path android:fillColor="@android:color/white" android:pathData="M160,800Q127,800 103.5,776.5Q80,753 80,720L80,240Q80,207 103.5,183.5Q127,160 160,160L400,160L480,240L800,240Q833,240 856.5,263.5Q880,287 880,320L880,720Q880,753 856.5,776.5Q833,800 800,800L160,800ZM160,720L800,720Q800,720 800,720Q800,720 800,720L800,320Q800,320 800,320Q800,320 800,320L447,320L367,240L160,240Q160,240 160,240Q160,240 160,240L160,720Q160,720 160,720Q160,720 160,720ZM160,720Q160,720 160,720Q160,720 160,720L160,240Q160,240 160,240Q160,240 160,240L160,240L160,320L160,320Q160,320 160,320Q160,320 160,320L160,720Q160,720 160,720Q160,720 160,720Z"/>
android:height="24dp"
android:tint="#707070"
android:viewportHeight="24.0"
android:viewportWidth="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M10,4H4c-1.1,0 -1.99,0.9 -1.99,2L2,18c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2V8c0,-1.1 -0.9,-2 -2,-2h-8l-2,-2z" />
</vector> </vector>
+2 -8
View File
@@ -1,9 +1,3 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960" android:tint="?attr/colorControlNormal">
android:width="24dp" <path android:fillColor="@android:color/white" android:pathData="M160,800Q127,800 103.5,776.5Q80,753 80,720L80,240Q80,207 103.5,183.5Q127,160 160,160L400,160L480,240L800,240Q833,240 856.5,263.5Q880,287 880,320L447,320L367,240L160,240Q160,240 160,240Q160,240 160,240L160,720Q160,720 160,720Q160,720 160,720L256,400L940,400L837,743Q829,769 807.5,784.5Q786,800 760,800L160,800ZM244,720L760,720L832,480L316,480L244,720ZM244,720L316,480L316,480L244,720ZM160,320L160,240Q160,240 160,240Q160,240 160,240L160,240L160,320Z"/>
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M20,6h-8l-2,-2L4,4c-1.1,0 -1.99,0.9 -1.99,2L2,18c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,8c0,-1.1 -0.9,-2 -2,-2zM20,18L4,18L4,8h16v10z" />
</vector> </vector>
+4
View File
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960" android:tint="?attr/colorControlNormal" android:autoMirrored="true">
<path android:fillColor="@android:color/white" android:pathData="M360,720L120,480L360,240L416,296L272,440L760,440L760,280L840,280L840,520L272,520L416,664L360,720Z"/>
</vector>
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="?attr/colorSurfaceContainer" />
<corners
android:topLeftRadius="12dp"
android:topRightRadius="12dp"
android:bottomLeftRadius="0dp"
android:bottomRightRadius="0dp" />
</shape>
@@ -196,7 +196,7 @@
android:scrollbars="none" /> android:scrollbars="none" />
<HorizontalScrollView <HorizontalScrollView
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_marginBottom="6dp" android:layout_marginBottom="6dp"
@@ -15,9 +15,10 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal" android:orientation="vertical"
android:gravity="center_horizontal" android:gravity="center_horizontal"
android:layout_margin="16dp"> android:layout_marginHorizontal="16dp"
android:layout_marginVertical="8dp">
<io.legado.app.ui.widget.image.CoverImageView <io.legado.app.ui.widget.image.CoverImageView
android:id="@+id/iv_cover" android:id="@+id/iv_cover"
@@ -25,17 +26,10 @@
android:layout_height="130dp" android:layout_height="130dp"
android:contentDescription="@string/img_cover" android:contentDescription="@string/img_cover"
android:scaleType="centerCrop" android:scaleType="centerCrop"
android:layout_marginBottom="8dp"
android:src="@drawable/image_cover_default" /> android:src="@drawable/image_cover_default" />
</LinearLayout>
<!-- Book Info Fields --> <com.google.android.material.textfield.TextInputLayout
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingHorizontal="16dp">
<io.legado.app.ui.widget.text.TextInputLayout
android:id="@+id/til_book_name" android:id="@+id/til_book_name"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@@ -47,9 +41,9 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:singleLine="true" /> android:singleLine="true" />
</io.legado.app.ui.widget.text.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
<io.legado.app.ui.widget.text.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:id="@+id/til_book_author" android:id="@+id/til_book_author"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@@ -61,14 +55,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:singleLine="true" /> android:singleLine="true" />
</io.legado.app.ui.widget.text.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:orientation="vertical">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@@ -91,7 +78,7 @@
android:entries="@array/book_type" /> android:entries="@array/book_type" />
</LinearLayout> </LinearLayout>
<io.legado.app.ui.widget.text.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:id="@+id/til_cover_url" android:id="@+id/til_cover_url"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@@ -102,7 +89,7 @@
android:id="@+id/tie_cover_url" android:id="@+id/tie_cover_url"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />
</io.legado.app.ui.widget.text.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@@ -110,31 +97,37 @@
android:orientation="horizontal" android:orientation="horizontal"
android:layout_marginBottom="16dp"> android:layout_marginBottom="16dp">
<io.legado.app.ui.widget.text.StrokeTextView <com.google.android.material.button.MaterialButton
android:id="@+id/tv_select_cover" android:id="@+id/tv_select_cover"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1"
style="@style/Widget.Material3.Button.TonalButton"
android:padding="8dp" android:padding="8dp"
android:text="@string/select_local_image" /> android:text="@string/select_local_image" />
<io.legado.app.ui.widget.text.StrokeTextView <com.google.android.material.button.MaterialButton
android:id="@+id/tv_change_cover" android:id="@+id/tv_change_cover"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="12dp" android:layout_weight="1"
style="@style/Widget.Material3.Button.TonalButton"
android:layout_marginStart="8dp"
android:padding="8dp" android:padding="8dp"
android:text="@string/change_cover_source" /> android:text="@string/change_cover_source" />
<io.legado.app.ui.widget.text.StrokeTextView <com.google.android.material.button.MaterialButton
android:id="@+id/tv_refresh_cover" android:id="@+id/tv_refresh_cover"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="12dp" android:layout_weight="1"
style="@style/Widget.Material3.Button.TonalButton"
android:layout_marginStart="8dp"
android:padding="8dp" android:padding="8dp"
android:text="@string/refresh_cover" /> android:text="@string/refresh_cover" />
</LinearLayout> </LinearLayout>
<io.legado.app.ui.widget.text.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:id="@+id/til_book_jj" android:id="@+id/til_book_jj"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@@ -145,6 +138,6 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:minLines="4" /> android:minLines="4" />
</io.legado.app.ui.widget.text.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
@@ -15,7 +15,8 @@
<HorizontalScrollView <HorizontalScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:scrollbars="none"> android:scrollbars="none"
android:paddingHorizontal="12dp">
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
@@ -23,7 +24,6 @@
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal" android:orientation="horizontal"
android:paddingHorizontal="8dp"
tools:ignore="VisualLintBounds"> tools:ignore="VisualLintBounds">
<TextView <TextView
@@ -77,7 +77,7 @@
android:id="@+id/tab_layout" android:id="@+id/tab_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:tabMode="fixed" android:paddingStart="12dp"
tools:ignore="SpeakableTextPresentCheck" /> tools:ignore="SpeakableTextPresentCheck" />
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
@@ -24,9 +24,9 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
android:padding="10dp"> android:padding="16dp">
<io.legado.app.ui.widget.text.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:id="@+id/til_name" android:id="@+id/til_name"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@@ -37,9 +37,9 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" /> tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" />
</io.legado.app.ui.widget.text.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
<io.legado.app.ui.widget.text.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:id="@+id/til_group" android:id="@+id/til_group"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@@ -50,9 +50,9 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" /> tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" />
</io.legado.app.ui.widget.text.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
<io.legado.app.ui.widget.text.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:id="@+id/til_replace_rule" android:id="@+id/til_replace_rule"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@@ -63,7 +63,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" /> tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" />
</io.legado.app.ui.widget.text.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@@ -84,12 +84,11 @@
android:layout_width="24dp" android:layout_width="24dp"
android:layout_height="24dp" android:layout_height="24dp"
android:src="@drawable/ic_help" android:src="@drawable/ic_help"
app:tint="@color/primaryText"
android:contentDescription="@string/help" /> android:contentDescription="@string/help" />
</LinearLayout> </LinearLayout>
<io.legado.app.ui.widget.text.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:id="@+id/til_replace_to" android:id="@+id/til_replace_to"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@@ -100,7 +99,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" /> tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" />
</io.legado.app.ui.widget.text.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
<androidx.appcompat.widget.LinearLayoutCompat <androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent" android:layout_width="match_parent"
@@ -125,7 +124,7 @@
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
<io.legado.app.ui.widget.text.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:id="@+id/til_scope" android:id="@+id/til_scope"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@@ -136,9 +135,9 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" /> tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" />
</io.legado.app.ui.widget.text.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
<io.legado.app.ui.widget.text.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:id="@+id/til_exclude_scope" android:id="@+id/til_exclude_scope"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@@ -149,9 +148,9 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" /> tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" />
</io.legado.app.ui.widget.text.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
<io.legado.app.ui.widget.text.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:id="@+id/til_timeout" android:id="@+id/til_timeout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@@ -163,7 +162,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:inputType="number" android:inputType="number"
tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" /> tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" />
</io.legado.app.ui.widget.text.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
</LinearLayout> </LinearLayout>
</io.legado.app.ui.widget.NoChildScrollNestedScrollView> </io.legado.app.ui.widget.NoChildScrollNestedScrollView>
@@ -24,7 +24,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:orientation="horizontal" android:orientation="horizontal"
android:paddingHorizontal="8dp" android:paddingHorizontal="12dp"
tools:ignore="VisualLintBounds"> tools:ignore="VisualLintBounds">
<io.legado.app.lib.theme.view.ThemeCheckBox <io.legado.app.lib.theme.view.ThemeCheckBox
@@ -58,7 +58,8 @@
<com.google.android.material.tabs.TabLayout <com.google.android.material.tabs.TabLayout
android:id="@+id/tab_layout" android:id="@+id/tab_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="36dp" android:layout_height="wrap_content"
android:paddingHorizontal="12dp"
tools:ignore="SpeakableTextPresentCheck" /> tools:ignore="SpeakableTextPresentCheck" />
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
@@ -4,8 +4,7 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical">
android:padding="16dp">
<androidx.appcompat.widget.Toolbar <androidx.appcompat.widget.Toolbar
android:id="@+id/tool_bar" android:id="@+id/tool_bar"
@@ -22,7 +21,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
android:gravity="center_horizontal" android:gravity="center_horizontal"
android:padding="8dp"> android:padding="16dp">
<io.legado.app.ui.widget.image.CoverImageView <io.legado.app.ui.widget.image.CoverImageView
android:id="@+id/iv_cover" android:id="@+id/iv_cover"
@@ -39,19 +38,19 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical">
<io.legado.app.ui.widget.text.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:id="@+id/til_group_name" android:id="@+id/til_group_name"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/group_name"> android:hint="@string/group_name">
<io.legado.app.lib.theme.view.ThemeEditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/tie_group_name" android:id="@+id/tie_group_name"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:maxLines="2" android:maxLines="2"
tools:ignore="TouchTargetSizeCheck,SpeakableTextPresentCheck" /> tools:ignore="TouchTargetSizeCheck,SpeakableTextPresentCheck" />
</io.legado.app.ui.widget.text.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
@@ -89,7 +88,8 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal" android:orientation="horizontal"
android:gravity="center_vertical"> android:gravity="center_vertical"
android:padding="16dp">
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
android:id="@+id/btn_delete" android:id="@+id/btn_delete"
@@ -4,8 +4,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical" android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent">
android:padding="12dp">
<androidx.appcompat.widget.Toolbar <androidx.appcompat.widget.Toolbar
android:id="@+id/tool_bar" android:id="@+id/tool_bar"
@@ -33,9 +33,9 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
android:padding="12dp"> android:padding="16dp">
<io.legado.app.ui.widget.text.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/name"> android:hint="@string/name">
@@ -46,9 +46,9 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" /> tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" />
</io.legado.app.ui.widget.text.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
<io.legado.app.ui.widget.text.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/url_rule"> android:hint="@string/url_rule">
@@ -59,9 +59,9 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" /> tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" />
</io.legado.app.ui.widget.text.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
<io.legado.app.ui.widget.text.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/show_rule"> android:hint="@string/show_rule">
@@ -72,7 +72,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" /> tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" />
</io.legado.app.ui.widget.text.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
</LinearLayout> </LinearLayout>
@@ -3,23 +3,20 @@
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical" android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent">
>
<androidx.appcompat.widget.Toolbar <com.google.android.material.appbar.MaterialToolbar
android:id="@+id/tool_bar" android:id="@+id/tool_bar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:theme="?attr/actionBarStyle"
app:titleTextAppearance="@style/ToolbarTitle" /> app:titleTextAppearance="@style/ToolbarTitle" />
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_path" android:id="@+id/rv_path"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="24dp" android:layout_height="24dp"
android:paddingLeft="10dp" android:paddingLeft="12dp"
android:paddingRight="10dp" android:paddingRight="12dp" />
android:elevation="5dp" />
<FrameLayout <FrameLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@@ -40,12 +37,12 @@
</FrameLayout> </FrameLayout>
<io.legado.app.ui.widget.text.AccentBgTextView <com.google.android.material.button.MaterialButton
android:id="@+id/tv_ok" android:id="@+id/tv_ok"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:padding="10dp" style="@style/Widget.Material3.Button.TonalButton"
android:layout_margin="3dp" android:layout_margin="8dp"
android:text="@string/ok" android:text="@string/ok"
android:gravity="center" /> android:gravity="center" />
@@ -11,7 +11,6 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:padding="6dp" android:padding="6dp"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:textColor="@color/primaryText"
android:textSize="17sp" /> android:textSize="17sp" />
<androidx.appcompat.widget.AppCompatSeekBar <androidx.appcompat.widget.AppCompatSeekBar
@@ -11,7 +11,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical">
<io.legado.app.ui.widget.text.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:id="@+id/layout_1" android:id="@+id/layout_1"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
@@ -22,9 +22,9 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" /> tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" />
</io.legado.app.ui.widget.text.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
<io.legado.app.ui.widget.text.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:id="@+id/layout_2" android:id="@+id/layout_2"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@@ -36,7 +36,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" /> tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" />
</io.legado.app.ui.widget.text.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
</LinearLayout> </LinearLayout>
@@ -72,6 +72,7 @@
android:id="@+id/tv_ok" android:id="@+id/tv_ok"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
style="@style/Widget.Material3.Button.UnelevatedButton"
android:padding="12dp" android:padding="12dp"
android:text="@string/ok" android:text="@string/ok"
android:visibility="gone" android:visibility="gone"
@@ -17,7 +17,6 @@
android:id="@+id/tool_bar" android:id="@+id/tool_bar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:elevation="5dp"
android:theme="?attr/actionBarStyle" android:theme="?attr/actionBarStyle"
app:displayHomeAsUp="false" app:displayHomeAsUp="false"
app:fitStatusBar="false" app:fitStatusBar="false"
@@ -28,15 +27,15 @@
<androidx.core.widget.NestedScrollView <androidx.core.widget.NestedScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingTop="6dp"
android:overScrollMode="ifContentScrolls"> android:overScrollMode="ifContentScrolls">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical"
android:padding="16dp">
<io.legado.app.ui.widget.text.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/name"> android:hint="@string/name">
@@ -47,9 +46,9 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" /> tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" />
</io.legado.app.ui.widget.text.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
<io.legado.app.ui.widget.text.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/regex"> android:hint="@string/regex">
@@ -60,9 +59,9 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" /> tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" />
</io.legado.app.ui.widget.text.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
<io.legado.app.ui.widget.text.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/example"> android:hint="@string/example">
@@ -73,7 +72,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" /> tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" />
</io.legado.app.ui.widget.text.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
</LinearLayout> </LinearLayout>
+2 -3
View File
@@ -6,7 +6,7 @@
android:padding="20dp" android:padding="20dp"
android:orientation="horizontal"> android:orientation="horizontal">
<io.legado.app.lib.theme.view.ThemeProgressBar <ProgressBar
android:id="@+id/pb" android:id="@+id/pb"
android:layout_width="30dp" android:layout_width="30dp"
android:layout_height="30dp" android:layout_height="30dp"
@@ -19,6 +19,5 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:padding="6dp" android:padding="6dp"
android:gravity="center" android:gravity="center"
android:text="@string/loading" android:text="@string/loading" />
android:textColor="@color/primaryText" />
</LinearLayout> </LinearLayout>
@@ -4,8 +4,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent">
android:fitsSystemWindows="true">
<com.google.android.material.appbar.AppBarLayout <com.google.android.material.appbar.AppBarLayout
android:id="@+id/title_bar" android:id="@+id/title_bar"
@@ -35,7 +34,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingStart="16dp" android:paddingStart="16dp"
android:background="?attr/colorSurface" android:background="@color/transparent"
tools:ignore="RtlSymmetry" /> tools:ignore="RtlSymmetry" />
</com.google.android.material.appbar.AppBarLayout> </com.google.android.material.appbar.AppBarLayout>
@@ -44,6 +43,7 @@
android:id="@+id/view_pager_bookshelf" android:id="@+id/view_pager_bookshelf"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:paddingHorizontal="8dp"
app:layout_behavior="@string/appbar_scrolling_view_behavior" /> app:layout_behavior="@string/appbar_scrolling_view_behavior" />
</androidx.coordinatorlayout.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>
+1 -2
View File
@@ -24,7 +24,7 @@
android:id="@+id/top_bar" android:id="@+id/top_bar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize" android:layout_height="?attr/actionBarSize"
app:title="@string/discovery" app:title="@string/rss"
app:layout_collapseMode="pin" /> app:layout_collapseMode="pin" />
</com.google.android.material.appbar.CollapsingToolbarLayout> </com.google.android.material.appbar.CollapsingToolbarLayout>
@@ -34,7 +34,6 @@
layout="@layout/view_search" layout="@layout/view_search"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:visibility="gone"
android:layout_marginHorizontal="16dp" /> android:layout_marginHorizontal="16dp" />
</com.google.android.material.appbar.AppBarLayout> </com.google.android.material.appbar.AppBarLayout>
+79 -84
View File
@@ -1,102 +1,97 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="horizontal"
android:padding="6dp"> android:paddingStart="8dp"
android:paddingEnd="16dp"
android:paddingVertical="8dp">
<io.legado.app.lib.theme.view.ThemeCheckBox <io.legado.app.lib.theme.view.ThemeCheckBox
android:id="@+id/checkbox" android:id="@+id/checkbox"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="10dp" android:layout_marginEnd="4dp"
android:gravity="center" android:gravity="center_vertical" />
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView <LinearLayout
android:id="@+id/tv_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="3dp"
android:singleLine="true"
android:text="@string/book_name"
android:textColor="@color/primaryText"
android:textSize="15sp"
app:layout_constraintBottom_toTopOf="@id/tv_group_s"
app:layout_constraintLeft_toRightOf="@id/checkbox"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_author"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingLeft="12dp" android:layout_weight="1"
android:paddingRight="8dp" android:orientation="vertical">
android:singleLine="true"
android:text="@string/author"
android:textColor="@color/tv_text_summary"
android:textSize="12sp"
app:layout_constraintBottom_toBottomOf="@+id/tv_name"
app:layout_constraintLeft_toRightOf="@+id/tv_name"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="@+id/tv_name"
tools:ignore="RtlHardcoded" />
<TextView <LinearLayout
android:id="@+id/tv_origin" android:layout_width="match_parent"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:layout_height="wrap_content" android:orientation="vertical">
android:layout_marginTop="8dp" <TextView
android:padding="3dp" android:id="@+id/tv_name"
android:textColor="@color/tv_text_summary" android:layout_width="wrap_content"
android:textSize="12sp" android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent" android:singleLine="true"
app:layout_constraintLeft_toRightOf="@+id/checkbox" android:text="@string/book_name"
app:layout_constraintTop_toBottomOf="@id/tv_author" android:textSize="20sp" />
tools:text="书源" />
<TextView <TextView
android:id="@+id/tv_group_s" android:id="@+id/tv_author"
android:layout_width="0dp" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp" android:layout_marginTop="4dp"
android:hint="@string/no_group" android:singleLine="true"
android:padding="3dp" android:text="@string/author"
android:singleLine="true" android:textSize="12sp"
android:textColor="@color/secondaryText" tools:ignore="RtlHardcoded" />
android:textSize="12sp" </LinearLayout>
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@+id/tv_origin"
app:layout_constraintRight_toLeftOf="@+id/tv_group"
app:layout_constraintTop_toBottomOf="@id/tv_author" />
<TextView
android:id="@+id/tv_group"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackgroundBorderless"
android:padding="10dp"
android:text="@string/group"
android:textColor="@color/secondaryText"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toLeftOf="@+id/tv_delete"
app:layout_constraintTop_toBottomOf="@id/tv_author" />
<TextView <LinearLayout
android:id="@+id/tv_delete" android:layout_width="match_parent"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:layout_height="wrap_content" android:orientation="horizontal"
android:background="?attr/selectableItemBackgroundBorderless" android:layout_marginTop="4dp">
android:padding="10dp"
android:text="@string/delete"
android:textColor="@color/secondaryText"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_author" />
</androidx.constraintlayout.widget.ConstraintLayout> <TextView
android:id="@+id/tv_origin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="12sp"
tools:text="@string/book_source" />
<TextView
android:id="@+id/tv_group_s"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/ungroup"
android:layout_marginStart="8dp"
android:singleLine="true"
android:textSize="12sp" />
</LinearLayout>
<!-- 按钮横向排列 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="end"
android:layout_marginTop="4dp">
<com.google.android.material.button.MaterialButton
android:id="@+id/tv_group"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/Widget.Material3.Button.TonalButton"
android:padding="2dp"
android:text="@string/group" />
<com.google.android.material.button.MaterialButton
android:id="@+id/tv_delete"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/Widget.Material3.Button.IconButton.Outlined"
app:icon="@drawable/ic_clear_all"
android:layout_marginStart="8dp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
@@ -3,26 +3,25 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal" android:orientation="horizontal"
android:padding="8dp"> android:padding="16dp">
<TextView <TextView
android:id="@+id/tv_group" android:id="@+id/tv_group"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:textColor="@color/secondaryText"
tools:text="group" /> tools:text="group" />
<TextView <com.google.android.material.button.MaterialButton
android:id="@+id/tv_edit" android:id="@+id/tv_edit"
android:layout_width="wrap_content" android:layout_width="48dp"
android:layout_height="wrap_content" android:layout_height="48dp"
android:background="?attr/selectableItemBackground" android:layout_marginEnd="8dp"
android:padding="8dp" style="@style/Widget.Material3.Button.IconButton.Filled.Tonal"
android:text="@string/edit" app:icon="@drawable/ic_edit" />
android:textColor="@color/secondaryText" />
<io.legado.app.lib.theme.view.ThemeSwitch <io.legado.app.lib.theme.view.ThemeSwitch
android:id="@+id/sw_show" android:id="@+id/sw_show"
+79 -82
View File
@@ -2,98 +2,95 @@
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/cv_content"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content">
android:background="@drawable/bg_item_focused_on_tv"
android:clickable="true"
android:focusable="true"
android:scrollbars="none"
tools:ignore="UnusedAttribute">
<com.google.android.material.card.MaterialCardView
<LinearLayout android:id="@+id/cv_content"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:layout_marginBottom="4dp"
android:paddingLeft="8dp" android:foreground="?attr/selectableItemBackground"
android:paddingTop="8dp" android:clickable="true"
android:paddingRight="8dp" android:focusable="true"
android:scrollbars="none" app:strokeWidth="0dp"
app:layout_constraintTop_toTopOf="parent"> app:layout_constraintTop_toTopOf="parent">
<androidx.constraintlayout.widget.ConstraintLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:scrollbars="none"> android:orientation="vertical">
<io.legado.app.ui.widget.image.CoverImageView <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/iv_cover" android:layout_width="match_parent"
android:layout_height="wrap_content">
<!-- 书封面 -->
<io.legado.app.ui.widget.image.CoverImageView
android:id="@+id/iv_cover"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:scaleType="centerCrop"
android:src="@drawable/image_cover_default"
android:transitionName="img_cover"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
tools:ignore="ImageContrastCheck" />
<com.google.android.material.card.MaterialCardView
android:id="@+id/cd_unread"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="4dp"
android:visibility="visible"
app:cardCornerRadius="4dp"
app:strokeWidth="0dp"
app:cardBackgroundColor="?attr/colorSecondaryVariant"
app:layout_constraintTop_toTopOf="@id/iv_cover"
app:layout_constraintEnd_toEndOf="@id/iv_cover">
<TextView
android:id="@+id/tv_unread"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="?attr/colorSurface"
android:textSize="10sp"
android:padding="4dp"
android:textStyle="bold"
android:includeFontPadding="false"
tools:text="5"
tools:ignore="SmallSp" />
</com.google.android.material.card.MaterialCardView>
<!-- 加载指示器 -->
<com.google.android.material.progressindicator.CircularProgressIndicator
android:id="@+id/rl_loading"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="invisible"
app:layout_constraintTop_toTopOf="@id/iv_cover"
app:layout_constraintEnd_toEndOf="@id/iv_cover"
android:layout_margin="8dp" />
</androidx.constraintlayout.widget.ConstraintLayout>
<!-- 书名 -->
<TextView
android:id="@+id/tv_name"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="8dp" android:layout_marginTop="8dp"
android:scaleType="centerCrop" android:layout_marginBottom="4dp"
android:scrollbars="none" android:layout_marginHorizontal="8dp"
android:src="@drawable/image_cover_default" android:ellipsize="end"
android:transitionName="img_cover" android:gravity="left"
app:layout_constraintTop_toTopOf="parent" android:lines="2"
tools:ignore="UnusedAttribute,ImageContrastCheck" android:text="@string/book_name"
tools:layout_editor_absoluteX="8dp" /> android:textSize="12sp"
android:textStyle="bold"
<io.legado.app.ui.widget.text.BadgeView
android:id="@+id/bv_unread"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:includeFontPadding="false"
android:scrollbars="none"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="RtlHardcoded" /> tools:ignore="RtlHardcoded" />
</LinearLayout>
<io.legado.app.ui.widget.anima.RotateLoading </com.google.android.material.card.MaterialCardView>
android:id="@+id/rl_loading"
android:layout_width="22dp"
android:layout_height="22dp"
android:layout_gravity="right"
android:scrollbars="none"
android:visibility="invisible"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:loading_width="2dp"
tools:ignore="RtlHardcoded" />
</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
android:id="@+id/tv_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:ellipsize="end"
android:gravity="top|center_horizontal"
android:includeFontPadding="false"
android:lines="2"
android:scrollbars="none"
android:text="@string/book_name"
android:textColor="@color/primaryText"
android:textSize="12sp"
tools:ignore="RtlHardcoded,RtlSymmetry" />
</LinearLayout>
<View
android:id="@+id/vw_foreground"
android:layout_width="match_parent"
android:layout_height="0dp"
android:background="?android:attr/selectableItemBackground"
android:scrollbars="none"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.0"
tools:layout_editor_absoluteX="0dp" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
+7 -7
View File
@@ -11,7 +11,7 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:singleLine="true" android:singleLine="true"
android:textColor="@color/primaryText" android:textSize="18sp"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@+id/iv_download" app:layout_constraintRight_toLeftOf="@+id/iv_download"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
@@ -22,7 +22,6 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:singleLine="true" android:singleLine="true"
android:textColor="@color/primaryText"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@+id/iv_download" app:layout_constraintRight_toLeftOf="@+id/iv_download"
app:layout_constraintTop_toBottomOf="@+id/tv_name" app:layout_constraintTop_toBottomOf="@+id/tv_name"
@@ -50,12 +49,13 @@
app:layout_constraintRight_toLeftOf="@+id/tv_export" app:layout_constraintRight_toLeftOf="@+id/tv_export"
app:layout_constraintTop_toTopOf="@id/tv_name" /> app:layout_constraintTop_toTopOf="@id/tv_name" />
<TextView <com.google.android.material.button.MaterialButton
android:id="@+id/tv_export" android:id="@+id/tv_export"
android:layout_width="wrap_content" android:layout_width="48dp"
android:layout_height="wrap_content" android:layout_height="36dp"
android:background="?attr/selectableItemBackground" style="@style/Widget.Material3.Button.TonalButton"
android:padding="10dp" android:textSize="12sp"
android:padding="0dp"
android:text="@string/export" android:text="@string/export"
app:layout_constraintBottom_toBottomOf="@+id/tv_download" app:layout_constraintBottom_toBottomOf="@+id/tv_download"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintRight_toRightOf="parent"
@@ -13,4 +13,5 @@
android:paddingEnd="16dp" android:paddingEnd="16dp"
android:maxLines="1" android:maxLines="1"
android:textSize="14sp" android:textSize="14sp"
android:textColor="?attr/colorPrimary"
tools:ignore="UnusedAttribute" /> tools:ignore="UnusedAttribute" />
+16 -18
View File
@@ -2,34 +2,32 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal" android:orientation="horizontal"
android:padding="8dp"> android:paddingHorizontal="16dp"
android:paddingVertical="8dp">
<TextView <TextView
android:id="@+id/tv_group" android:id="@+id/tv_group"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" style="@style/TextAppearance.AppCompat.Medium"
android:textColor="@color/primaryText" /> android:layout_weight="1" />
<TextView <com.google.android.material.button.MaterialButton
android:id="@+id/tv_edit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:padding="8dp"
android:text="@string/edit"
android:textColor="@color/primaryText" />
<TextView
android:id="@+id/tv_del" android:id="@+id/tv_del"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="12dp" style="@style/Widget.Material3.Button.IconButton.Outlined"
android:background="?attr/selectableItemBackground" android:layout_marginEnd="4dp"
android:padding="8dp" app:icon="@drawable/ic_clear_all" />
android:text="@string/delete"
android:textColor="@color/primaryText" /> <com.google.android.material.button.MaterialButton
android:id="@+id/tv_edit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/Widget.Material3.Button.IconButton.Filled.Tonal"
app:icon="@drawable/ic_edit" />
</LinearLayout> </LinearLayout>
@@ -2,7 +2,10 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:padding="8dp" xmlns:app="http://schemas.android.com/apk/res-auto"
android:paddingVertical="8dp"
android:paddingStart="12dp"
android:paddingEnd="16dp"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">
@@ -12,15 +15,13 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_weight="1" android:layout_weight="1"
android:singleLine="true" android:singleLine="true" />
android:textColor="@color/primaryText" />
<TextView <com.google.android.material.button.MaterialButton
android:id="@+id/tv_edit" android:id="@+id/tv_edit"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground" style="@style/Widget.Material3.Button.IconButton.Filled.Tonal"
android:padding="8dp" app:icon="@drawable/ic_edit" />
android:text="@string/edit" />
</LinearLayout> </LinearLayout>
@@ -3,6 +3,7 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="?android:attr/listPreferredItemHeight" android:layout_height="?android:attr/listPreferredItemHeight"
android:padding="16dp"
android:background="?attr/selectableItemBackground"> android:background="?attr/selectableItemBackground">
<ImageView <ImageView
+2 -2
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<io.legado.app.ui.widget.text.TextInputLayout <com.google.android.material.textfield.TextInputLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/textInputLayout" android:id="@+id/textInputLayout"
@@ -17,4 +17,4 @@
android:inputType="textMultiLine" android:inputType="textMultiLine"
tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" /> tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" />
</io.legado.app.ui.widget.text.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
+1 -1
View File
@@ -6,7 +6,7 @@
android:theme="?attr/actionBarStyle" android:theme="?attr/actionBarStyle"
android:background="@drawable/bg_searchview" android:background="@drawable/bg_searchview"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="40dp" android:layout_height="36dp"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:layout_marginBottom="8dp" android:layout_marginBottom="8dp"
android:imeOptions="actionSearch" android:imeOptions="actionSearch"
@@ -4,12 +4,11 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:elevation="2dp"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal" android:orientation="horizontal"
android:paddingLeft="16dp" android:paddingEnd="16dp"
android:paddingTop="6dp" android:paddingTop="6dp"
android:paddingRight="8dp" android:paddingStart="16dp"
android:paddingBottom="6dp" android:paddingBottom="6dp"
tools:ignore="RtlHardcoded"> tools:ignore="RtlHardcoded">
@@ -18,13 +17,14 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:padding="5dp" android:padding="4dp"
android:text="@string/select_all" /> android:text="@string/select_all" />
<io.legado.app.ui.widget.button.AccentStrokeButton <com.google.android.material.button.MaterialButton
android:id="@+id/btn_revert_selection" android:id="@+id/btn_revert_selection"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
style="@style/Widget.Material3.Button.TonalButton"
android:layout_margin="5dp" android:layout_margin="5dp"
android:gravity="center" android:gravity="center"
android:minWidth="72dp" android:minWidth="72dp"
@@ -32,7 +32,7 @@
android:text="@string/revert_selection" android:text="@string/revert_selection"
app:isBottomBackground="true" /> app:isBottomBackground="true" />
<io.legado.app.ui.widget.button.AccentStrokeButton <com.google.android.material.button.MaterialButton
android:id="@+id/btn_select_action_main" android:id="@+id/btn_select_action_main"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@@ -52,7 +52,6 @@
android:contentDescription="@string/more_menu" android:contentDescription="@string/more_menu"
android:padding="6dp" android:padding="6dp"
android:src="@drawable/ic_more_vert" android:src="@drawable/ic_more_vert"
android:tint="@color/primaryText"
android:tooltipText="@string/more_menu" android:tooltipText="@string/more_menu"
android:visibility="gone" android:visibility="gone"
tools:ignore="RtlHardcoded,UnusedAttribute" /> tools:ignore="RtlHardcoded,UnusedAttribute" />
+1
View File
@@ -1218,4 +1218,5 @@
<string name="manga_color_filter">滤镜</string> <string name="manga_color_filter">滤镜</string>
<string name="hide_manga_title">隐藏漫画列表标题</string> <string name="hide_manga_title">隐藏漫画列表标题</string>
<string name="refresh_explore">刷新发现</string> <string name="refresh_explore">刷新发现</string>
<string name="ungroup">未分组</string>
</resources> </resources>
+1 -1
View File
@@ -101,7 +101,7 @@
<item name="android:textFontWeight" tools:targetApi="p">500</item> <item name="android:textFontWeight" tools:targetApi="p">500</item>
</style> </style>
<style name="PreferenceDialogTheme" parent="Theme.Material3.DayNight.Dialog.Alert"> <style name="PreferenceDialogTheme" parent="Theme.Material3.DayNight">
</style> </style>