清理代码与更新界面
This commit is contained in:
1 parent
1607984faa
commit
b2918df258
35 files changed
+108
-132
No files matched your search
@@ -10,6 +10,8 @@ import androidx.core.net.toUri
|
|||||||
import androidx.lifecycle.lifecycleScope
|
import androidx.lifecycle.lifecycleScope
|
||||||
import io.legato.kazusa.R
|
import io.legato.kazusa.R
|
||||||
import io.legato.kazusa.base.BaseActivity
|
import io.legato.kazusa.base.BaseActivity
|
||||||
|
import io.legato.kazusa.constant.AppConst
|
||||||
|
import io.legato.kazusa.constant.AppConst.appInfo
|
||||||
import io.legato.kazusa.constant.AppLog
|
import io.legato.kazusa.constant.AppLog
|
||||||
import io.legato.kazusa.databinding.ActivityAboutBinding
|
import io.legato.kazusa.databinding.ActivityAboutBinding
|
||||||
import io.legato.kazusa.help.CrashHandler
|
import io.legato.kazusa.help.CrashHandler
|
||||||
@@ -50,6 +52,8 @@ class AboutActivity : BaseActivity<ActivityAboutBinding>() {
|
|||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
setSupportActionBar(binding.topBar)
|
setSupportActionBar(binding.topBar)
|
||||||
|
|
||||||
|
binding.tvVersion.text = appInfo.versionName
|
||||||
|
|
||||||
binding.btnUpdate.setOnClickListener {
|
binding.btnUpdate.setOnClickListener {
|
||||||
checkUpdate()
|
checkUpdate()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ class ExploreShowAdapter(context: Context, val callBack: CallBack) :
|
|||||||
llKind.gone()
|
llKind.gone()
|
||||||
} else {
|
} else {
|
||||||
llKind.visible()
|
llKind.visible()
|
||||||
llKind.setLabels(kinds)
|
llKind.setLabels(kinds) {}
|
||||||
}
|
}
|
||||||
ivCover.load(
|
ivCover.load(
|
||||||
item.coverUrl,
|
item.coverUrl,
|
||||||
|
|||||||
@@ -361,7 +361,7 @@ class BookInfoActivity :
|
|||||||
lbKind.gone()
|
lbKind.gone()
|
||||||
} else {
|
} else {
|
||||||
lbKind.visible()
|
lbKind.visible()
|
||||||
lbKind.setLabels(kinds)
|
lbKind.setLabels(kinds) {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import android.content.Context
|
|||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import androidx.core.view.isVisible
|
import androidx.core.view.isVisible
|
||||||
|
import androidx.core.view.marginEnd
|
||||||
import androidx.recyclerview.widget.DiffUtil
|
import androidx.recyclerview.widget.DiffUtil
|
||||||
import io.legato.kazusa.R
|
import io.legato.kazusa.R
|
||||||
import io.legato.kazusa.base.adapter.DiffRecyclerAdapter
|
import io.legato.kazusa.base.adapter.DiffRecyclerAdapter
|
||||||
@@ -11,6 +12,7 @@ import io.legato.kazusa.base.adapter.ItemViewHolder
|
|||||||
import io.legato.kazusa.data.entities.SearchBook
|
import io.legato.kazusa.data.entities.SearchBook
|
||||||
import io.legato.kazusa.databinding.ItemSearchBinding
|
import io.legato.kazusa.databinding.ItemSearchBinding
|
||||||
import io.legato.kazusa.help.config.AppConfig
|
import io.legato.kazusa.help.config.AppConfig
|
||||||
|
import io.legato.kazusa.utils.dpToPx
|
||||||
import io.legato.kazusa.utils.gone
|
import io.legato.kazusa.utils.gone
|
||||||
import io.legato.kazusa.utils.visible
|
import io.legato.kazusa.utils.visible
|
||||||
|
|
||||||
@@ -138,7 +140,9 @@ class SearchAdapter(context: Context, val callBack: CallBack) :
|
|||||||
llKind.gone()
|
llKind.gone()
|
||||||
} else {
|
} else {
|
||||||
llKind.visible()
|
llKind.visible()
|
||||||
llKind.setLabels(kinds)
|
llKind.setLabels(kinds) { chips ->
|
||||||
|
chips.textSize = 12f
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,24 +16,20 @@ class LabelsBar @JvmOverloads constructor(
|
|||||||
private val unUsedChips = arrayListOf<Chip>()
|
private val unUsedChips = arrayListOf<Chip>()
|
||||||
private val usedChips = arrayListOf<Chip>()
|
private val usedChips = arrayListOf<Chip>()
|
||||||
|
|
||||||
fun setLabels(labels: List<String>) {
|
|
||||||
clear()
|
|
||||||
labels.forEach {
|
|
||||||
addLabel(it)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fun setLabels(labels: Array<String>) {
|
|
||||||
setLabels(labels.toList())
|
|
||||||
}
|
|
||||||
|
|
||||||
fun clear() {
|
fun clear() {
|
||||||
unUsedChips.addAll(usedChips)
|
unUsedChips.addAll(usedChips)
|
||||||
usedChips.clear()
|
usedChips.clear()
|
||||||
removeAllViews()
|
removeAllViews()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun addLabel(label: String) {
|
fun setLabels(labels: List<String>, style: (Chip) -> Unit) {
|
||||||
|
clear()
|
||||||
|
labels.forEach {
|
||||||
|
addLabel(it, style)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun addLabel(label: String, style: (Chip) -> Unit) {
|
||||||
val chip = if (unUsedChips.isEmpty()) {
|
val chip = if (unUsedChips.isEmpty()) {
|
||||||
Chip(context).apply {
|
Chip(context).apply {
|
||||||
isClickable = false
|
isClickable = false
|
||||||
@@ -41,11 +37,9 @@ class LabelsBar @JvmOverloads constructor(
|
|||||||
chipStartPadding = 8f
|
chipStartPadding = 8f
|
||||||
chipEndPadding = 8f
|
chipEndPadding = 8f
|
||||||
chipStrokeWidth = 0f
|
chipStrokeWidth = 0f
|
||||||
|
|
||||||
chipBackgroundColor = ColorStateList.valueOf(
|
chipBackgroundColor = ColorStateList.valueOf(
|
||||||
context.themeColor(com.google.android.material.R.attr.colorPrimaryContainer)
|
context.themeColor(com.google.android.material.R.attr.colorPrimaryContainer)
|
||||||
)
|
)
|
||||||
|
|
||||||
usedChips.add(this)
|
usedChips.add(this)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -53,7 +47,9 @@ class LabelsBar @JvmOverloads constructor(
|
|||||||
usedChips.add(it)
|
usedChips.add(it)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
style(chip) // 在这里应用外部传入的样式
|
||||||
chip.text = label
|
chip.text = label
|
||||||
addView(chip)
|
addView(chip)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -62,17 +62,39 @@
|
|||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_name"
|
android:id="@+id/tv_name"
|
||||||
android:layout_width="0dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="8dp"
|
android:layout_marginStart="8dp"
|
||||||
android:text="@string/app_name"
|
android:text="@string/app_name"
|
||||||
android:layout_marginEnd="16dp"
|
android:layout_marginEnd="16dp"
|
||||||
android:textSize="20sp"
|
android:textSize="24sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/cd_about"
|
app:layout_constraintStart_toEndOf="@id/cd_about"
|
||||||
app:layout_constraintTop_toTopOf="@id/cd_about" />
|
app:layout_constraintTop_toTopOf="@id/cd_about" />
|
||||||
|
|
||||||
|
<com.google.android.material.card.MaterialCardView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:layout_marginTop="2dp"
|
||||||
|
app:cardBackgroundColor="?attr/colorTertiaryContainer"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/tv_name"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/tv_name"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/tv_name"
|
||||||
|
app:strokeWidth="0dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_version"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingHorizontal="8dp"
|
||||||
|
android:paddingVertical="4dp"
|
||||||
|
android:text="@string/text"
|
||||||
|
android:textColor="?attr/colorTertiary"
|
||||||
|
android:textSize="10sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@@ -98,7 +120,7 @@
|
|||||||
android:layout_width="8dp"
|
android:layout_width="8dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginVertical="8dp"
|
android:layout_marginVertical="8dp"
|
||||||
android:layout_marginEnd="12dp"
|
android:layout_marginEnd="10dp"
|
||||||
app:cardBackgroundColor="?attr/colorTertiary"
|
app:cardBackgroundColor="?attr/colorTertiary"
|
||||||
app:strokeWidth="0dp" />
|
app:strokeWidth="0dp" />
|
||||||
|
|
||||||
@@ -107,7 +129,7 @@
|
|||||||
style="@style/Widget.Material3Expressive.Button.IconButton.Tonal"
|
style="@style/Widget.Material3Expressive.Button.IconButton.Tonal"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginEnd="8dp"
|
android:layout_marginEnd="4dp"
|
||||||
app:icon="@drawable/ic_web_outline" />
|
app:icon="@drawable/ic_web_outline" />
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
<com.google.android.material.button.MaterialButton
|
||||||
|
|||||||
@@ -90,6 +90,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="16dp"
|
android:layout_margin="16dp"
|
||||||
|
app:backgroundTint="?attr/colorTertiaryContainer"
|
||||||
android:contentDescription="@string/stop"
|
android:contentDescription="@string/stop"
|
||||||
android:src="@drawable/ic_stop_black_24dp"
|
android:src="@drawable/ic_stop_black_24dp"
|
||||||
android:visibility="invisible" />
|
android:visibility="invisible" />
|
||||||
|
|||||||
@@ -13,8 +13,7 @@
|
|||||||
android:theme="?attr/actionBarStyle"
|
android:theme="?attr/actionBarStyle"
|
||||||
app:contentInsetStartWithNavigation="0dp"
|
app:contentInsetStartWithNavigation="0dp"
|
||||||
app:displayHomeAsUp="false"
|
app:displayHomeAsUp="false"
|
||||||
app:fitStatusBar="false"
|
app:fitStatusBar="false" />
|
||||||
app:titleTextAppearance="@style/ToolbarTitle" />
|
|
||||||
|
|
||||||
<com.google.android.material.progressindicator.LinearProgressIndicator
|
<com.google.android.material.progressindicator.LinearProgressIndicator
|
||||||
android:id="@+id/refresh_progress_bar"
|
android:id="@+id/refresh_progress_bar"
|
||||||
|
|||||||
@@ -10,8 +10,7 @@
|
|||||||
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"
|
android:theme="?attr/actionBarStyle" />
|
||||||
app:titleTextAppearance="@style/ToolbarTitle" />
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/recycler_view"
|
android:id="@+id/recycler_view"
|
||||||
|
|||||||
@@ -14,8 +14,7 @@
|
|||||||
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"
|
||||||
app:title="@string/bookmark"
|
app:title="@string/bookmark" />
|
||||||
app:titleTextAppearance="@style/ToolbarTitle" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_chapter_name"
|
android:id="@+id/tv_chapter_name"
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:elevation="5dp"
|
android:elevation="5dp"
|
||||||
android:theme="?attr/actionBarStyle"
|
android:theme="?attr/actionBarStyle"
|
||||||
app:titleTextAppearance="@style/ToolbarTitle"
|
|
||||||
app:displayHomeAsUp="false"
|
app:displayHomeAsUp="false"
|
||||||
app:fitStatusBar="false" />
|
app:fitStatusBar="false" />
|
||||||
|
|
||||||
|
|||||||
@@ -14,8 +14,7 @@
|
|||||||
android:theme="?attr/actionBarStyle"
|
android:theme="?attr/actionBarStyle"
|
||||||
app:displayHomeAsUp="false"
|
app:displayHomeAsUp="false"
|
||||||
app:fitStatusBar="false"
|
app:fitStatusBar="false"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
app:titleTextAppearance="@style/ToolbarTitle" />
|
|
||||||
|
|
||||||
<io.legato.kazusa.ui.widget.anima.RefreshProgressBar
|
<io.legato.kazusa.ui.widget.anima.RefreshProgressBar
|
||||||
android:id="@+id/refresh_progress_bar"
|
android:id="@+id/refresh_progress_bar"
|
||||||
|
|||||||
@@ -10,8 +10,7 @@
|
|||||||
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"
|
||||||
app:title="code edit"
|
app:title="code edit" />
|
||||||
app:titleTextAppearance="@style/ToolbarTitle" />
|
|
||||||
|
|
||||||
<io.legato.kazusa.ui.widget.code.CodeView
|
<io.legato.kazusa.ui.widget.code.CodeView
|
||||||
android:id="@+id/code_view"
|
android:id="@+id/code_view"
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:theme="?attr/actionBarStyle"
|
android:theme="?attr/actionBarStyle"
|
||||||
app:title="edit"
|
app:title="edit"
|
||||||
app:titleTextAppearance="@style/ToolbarTitle"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<io.legato.kazusa.lib.theme.view.ThemeEditText
|
<io.legato.kazusa.lib.theme.view.ThemeEditText
|
||||||
|
|||||||
@@ -16,8 +16,7 @@
|
|||||||
style="?attr/actionBarStyle"
|
style="?attr/actionBarStyle"
|
||||||
app:displayHomeAsUp="false"
|
app:displayHomeAsUp="false"
|
||||||
app:fitStatusBar="false"
|
app:fitStatusBar="false"
|
||||||
app:title="@string/dict_rule"
|
app:title="@string/dict_rule" />
|
||||||
app:titleTextAppearance="@style/ToolbarTitle" />
|
|
||||||
|
|
||||||
<androidx.core.widget.NestedScrollView
|
<androidx.core.widget.NestedScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|||||||
@@ -10,8 +10,7 @@
|
|||||||
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"
|
||||||
app:title="@string/direct_link_upload_config"
|
app:title="@string/direct_link_upload_config" />
|
||||||
app:titleTextAppearance="@style/ToolbarTitle" />
|
|
||||||
|
|
||||||
<androidx.core.widget.NestedScrollView
|
<androidx.core.widget.NestedScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|||||||
@@ -8,8 +8,7 @@
|
|||||||
<com.google.android.material.appbar.MaterialToolbar
|
<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" />
|
||||||
app:titleTextAppearance="@style/ToolbarTitle" />
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/rv_path"
|
android:id="@+id/rv_path"
|
||||||
|
|||||||
@@ -9,8 +9,7 @@
|
|||||||
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"
|
android:theme="?attr/actionBarStyle" />
|
||||||
app:titleTextAppearance="@style/ToolbarTitle" />
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/recycler_view"
|
android:id="@+id/recycler_view"
|
||||||
|
|||||||
@@ -18,8 +18,7 @@
|
|||||||
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"
|
||||||
app:title="@string/speak_engine"
|
app:title="@string/speak_engine" />
|
||||||
app:titleTextAppearance="@style/ToolbarTitle" />
|
|
||||||
|
|
||||||
<androidx.core.widget.NestedScrollView
|
<androidx.core.widget.NestedScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|||||||
@@ -1,45 +1,36 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<FrameLayout 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"
|
android:id="@+id/vw_bg"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:paddingHorizontal="16dp"
|
android:layout_gravity="center"
|
||||||
android:paddingVertical="8dp">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<LinearLayout
|
<androidx.appcompat.widget.Toolbar
|
||||||
android:id="@+id/vw_bg"
|
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:layout_gravity="center"
|
app:displayHomeAsUp="false"
|
||||||
android:orientation="vertical"
|
app:fitStatusBar="false"
|
||||||
tools:ignore="UselessParent">
|
app:title="@string/login" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.Toolbar
|
<androidx.core.widget.NestedScrollView
|
||||||
android:id="@+id/tool_bar"
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginHorizontal="12dp"
|
||||||
|
android:overScrollMode="ifContentScrolls">
|
||||||
|
|
||||||
|
<com.google.android.flexbox.FlexboxLayout
|
||||||
|
android:id="@+id/flexbox"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
app:title="@string/login"
|
android:layout_marginTop="8dp"
|
||||||
app:displayHomeAsUp="false"
|
android:clipToPadding="false"
|
||||||
app:fitStatusBar="false"
|
android:paddingVertical="8dp"
|
||||||
app:titleTextAppearance="@style/ToolbarTitle" />
|
app:flexDirection="row"
|
||||||
|
app:flexWrap="wrap" />
|
||||||
|
|
||||||
<androidx.core.widget.NestedScrollView
|
</androidx.core.widget.NestedScrollView>
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:overScrollMode="ifContentScrolls">
|
|
||||||
|
|
||||||
<com.google.android.flexbox.FlexboxLayout
|
</LinearLayout>
|
||||||
android:id="@+id/flexbox"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:paddingVertical="8dp"
|
|
||||||
android:layout_marginTop="8dp"
|
|
||||||
android:clipToPadding="false"
|
|
||||||
app:flexDirection="row"
|
|
||||||
app:flexWrap="wrap" />
|
|
||||||
|
|
||||||
</androidx.core.widget.NestedScrollView>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
</FrameLayout>
|
|
||||||
@@ -11,8 +11,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:elevation="5dp"
|
android:elevation="5dp"
|
||||||
android:theme="?attr/actionBarStyle"
|
android:theme="?attr/actionBarStyle"
|
||||||
app:title="跳转确认"
|
app:title="跳转确认" />
|
||||||
app:titleTextAppearance="@style/ToolbarTitle" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/message"
|
android:id="@+id/message"
|
||||||
|
|||||||
@@ -20,8 +20,7 @@
|
|||||||
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"
|
||||||
app:title="@string/favorite"
|
app:title="@string/favorite" />
|
||||||
app:titleTextAppearance="@style/ToolbarTitle" />
|
|
||||||
|
|
||||||
<androidx.core.widget.NestedScrollView
|
<androidx.core.widget.NestedScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|||||||
@@ -13,8 +13,7 @@
|
|||||||
app:displayHomeAsUp="false"
|
app:displayHomeAsUp="false"
|
||||||
app:fitStatusBar="false"
|
app:fitStatusBar="false"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:title="@string/search_scope"
|
app:title="@string/search_scope" />
|
||||||
app:titleTextAppearance="@style/ToolbarTitle" />
|
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButtonToggleGroup
|
<com.google.android.material.button.MaterialButtonToggleGroup
|
||||||
android:id="@+id/rg_scope"
|
android:id="@+id/rg_scope"
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
app:attachToActivity="false"
|
app:attachToActivity="false"
|
||||||
app:contentLayout="@layout/view_search"
|
app:contentLayout="@layout/view_search"
|
||||||
app:fitStatusBar="false"
|
app:fitStatusBar="false"
|
||||||
app:titleTextAppearance="@style/ToolbarTitle"
|
|
||||||
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
|
|||||||
@@ -10,8 +10,7 @@
|
|||||||
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"
|
android:theme="?attr/actionBarStyle" />
|
||||||
app:titleTextAppearance="@style/ToolbarTitle" />
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/recycler_view"
|
android:id="@+id/recycler_view"
|
||||||
|
|||||||
@@ -19,8 +19,7 @@
|
|||||||
android:theme="?attr/actionBarStyle"
|
android:theme="?attr/actionBarStyle"
|
||||||
app:displayHomeAsUp="false"
|
app:displayHomeAsUp="false"
|
||||||
app:fitStatusBar="false"
|
app:fitStatusBar="false"
|
||||||
app:title="@string/txt_toc_rule"
|
app:title="@string/txt_toc_rule" />
|
||||||
app:titleTextAppearance="@style/ToolbarTitle" />
|
|
||||||
|
|
||||||
<androidx.core.widget.NestedScrollView
|
<androidx.core.widget.NestedScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|||||||
@@ -13,8 +13,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
app:displayHomeAsUp="false"
|
app:displayHomeAsUp="false"
|
||||||
app:title="Set variable"
|
app:title="Set variable" />
|
||||||
app:titleTextAppearance="@style/ToolbarTitle" />
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|||||||
@@ -12,8 +12,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:elevation="5dp"
|
android:elevation="5dp"
|
||||||
android:theme="?attr/actionBarStyle"
|
android:theme="?attr/actionBarStyle"
|
||||||
app:title="@string/input_verification_code"
|
app:title="@string/input_verification_code" />
|
||||||
app:titleTextAppearance="@style/ToolbarTitle" />
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
android:id="@+id/verification_code_image_view"
|
android:id="@+id/verification_code_image_view"
|
||||||
|
|||||||
@@ -24,8 +24,7 @@
|
|||||||
android:theme="?attr/actionBarStyle"
|
android:theme="?attr/actionBarStyle"
|
||||||
app:title="@string/server_config"
|
app:title="@string/server_config"
|
||||||
app:displayHomeAsUp="false"
|
app:displayHomeAsUp="false"
|
||||||
app:fitStatusBar="false"
|
app:fitStatusBar="false" />
|
||||||
app:titleTextAppearance="@style/ToolbarTitle" />
|
|
||||||
|
|
||||||
<io.legato.kazusa.ui.widget.text.TextInputLayout
|
<io.legato.kazusa.ui.widget.text.TextInputLayout
|
||||||
android:id="@+id/til_name"
|
android:id="@+id/til_name"
|
||||||
|
|||||||
@@ -3,9 +3,8 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_margin="2dp"
|
app:cardBackgroundColor="?attr/colorTertiaryContainer"
|
||||||
app:cardBackgroundColor="?attr/colorSecondary"
|
app:strokeColor="?attr/colorTertiaryContainer"
|
||||||
app:strokeColor="?attr/colorSecondary"
|
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true">
|
android:focusable="true">
|
||||||
<TextView
|
<TextView
|
||||||
@@ -21,7 +20,7 @@
|
|||||||
android:paddingEnd="16dp"
|
android:paddingEnd="16dp"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
android:textColor="?attr/colorSurface"
|
android:textColor="?attr/colorTertiary"
|
||||||
tools:ignore="UnusedAttribute" />
|
tools:ignore="UnusedAttribute" />
|
||||||
</com.google.android.material.card.MaterialCardView>
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:paddingHorizontal="16dp"
|
android:paddingHorizontal="16dp"
|
||||||
android:paddingVertical="8dp"
|
android:paddingVertical="4dp"
|
||||||
android:animateLayoutChanges="true"
|
android:animateLayoutChanges="true"
|
||||||
android:background="?attr/selectableItemBackground">
|
android:background="?attr/selectableItemBackground">
|
||||||
|
|
||||||
@@ -33,8 +33,8 @@
|
|||||||
<com.google.android.material.button.MaterialButton
|
<com.google.android.material.button.MaterialButton
|
||||||
android:id="@+id/iv_status"
|
android:id="@+id/iv_status"
|
||||||
style="@style/Widget.Material3Expressive.Button.IconButton.Tonal"
|
style="@style/Widget.Material3Expressive.Button.IconButton.Tonal"
|
||||||
android:layout_width="48dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="48dp"
|
android:layout_height="wrap_content"
|
||||||
app:icon="@drawable/ic_arrow_right"/>
|
app:icon="@drawable/ic_arrow_right"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
android:layout_margin="4dp"
|
android:layout_margin="4dp"
|
||||||
android:scaleType="centerCrop"
|
android:scaleType="centerCrop"
|
||||||
android:visibility="visible"
|
android:visibility="visible"
|
||||||
app:cardBackgroundColor="?attr/colorPrimary"
|
app:cardBackgroundColor="?attr/colorTertiaryContainer"
|
||||||
app:cardCornerRadius="4dp"
|
app:cardCornerRadius="4dp"
|
||||||
app:strokeWidth="0dp">
|
app:strokeWidth="0dp">
|
||||||
|
|
||||||
@@ -47,7 +47,8 @@
|
|||||||
android:paddingHorizontal="4dp"
|
android:paddingHorizontal="4dp"
|
||||||
android:paddingVertical="2dp"
|
android:paddingVertical="2dp"
|
||||||
android:text="书架中"
|
android:text="书架中"
|
||||||
android:textColor="?attr/colorSurface"
|
android:textColor="?attr/colorTertiary"
|
||||||
|
android:textStyle="bold"
|
||||||
android:textSize="10sp"
|
android:textSize="10sp"
|
||||||
tools:ignore="SmallSp" />
|
tools:ignore="SmallSp" />
|
||||||
</com.google.android.material.card.MaterialCardView>
|
</com.google.android.material.card.MaterialCardView>
|
||||||
@@ -77,7 +78,7 @@
|
|||||||
android:layout_toStartOf="@id/bv_originCount"
|
android:layout_toStartOf="@id/bv_originCount"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:text="@string/app_name"
|
android:text="@string/app_name"
|
||||||
style="@style/TextAppearance.AppCompat.Medium" />
|
style="@style/ChapterNameText" />
|
||||||
|
|
||||||
<!-- 来源计数 -->
|
<!-- 来源计数 -->
|
||||||
<io.legato.kazusa.ui.widget.text.BadgeView
|
<io.legato.kazusa.ui.widget.text.BadgeView
|
||||||
@@ -94,7 +95,6 @@
|
|||||||
android:id="@+id/tv_author"
|
android:id="@+id/tv_author"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginVertical="3dp"
|
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:lines="1"
|
android:lines="1"
|
||||||
android:text="@string/author"
|
android:text="@string/author"
|
||||||
@@ -109,7 +109,8 @@
|
|||||||
<io.legato.kazusa.ui.widget.LabelsBar
|
<io.legato.kazusa.ui.widget.LabelsBar
|
||||||
android:id="@+id/ll_kind"
|
android:id="@+id/ll_kind"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="40dp"
|
||||||
|
app:chipSpacingHorizontal="4dp"
|
||||||
android:orientation="horizontal" />
|
android:orientation="horizontal" />
|
||||||
|
|
||||||
</HorizontalScrollView>
|
</HorizontalScrollView>
|
||||||
@@ -119,7 +120,6 @@
|
|||||||
android:id="@+id/tv_lasted"
|
android:id="@+id/tv_lasted"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="3dp"
|
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:lines="1"
|
android:lines="1"
|
||||||
android:text="@string/last_read"
|
android:text="@string/last_read"
|
||||||
|
|||||||
@@ -3,5 +3,4 @@
|
|||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:id="@+id/toolbar"
|
android:id="@+id/toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content" />
|
||||||
app:titleTextAppearance="@style/ToolbarTitle" />
|
|
||||||
@@ -110,25 +110,21 @@
|
|||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/menu_add_book_source"
|
android:id="@+id/menu_add_book_source"
|
||||||
android:icon="@drawable/ic_add"
|
|
||||||
android:title="@string/add_book_source"
|
android:title="@string/add_book_source"
|
||||||
app:showAsAction="never" />
|
app:showAsAction="never" />
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/menu_import_local"
|
android:id="@+id/menu_import_local"
|
||||||
android:icon="@drawable/ic_import"
|
|
||||||
android:title="@string/import_local"
|
android:title="@string/import_local"
|
||||||
app:showAsAction="never" />
|
app:showAsAction="never" />
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/menu_import_onLine"
|
android:id="@+id/menu_import_onLine"
|
||||||
android:icon="@drawable/ic_import"
|
|
||||||
android:title="@string/import_on_line"
|
android:title="@string/import_on_line"
|
||||||
app:showAsAction="never" />
|
app:showAsAction="never" />
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/menu_import_qr"
|
android:id="@+id/menu_import_qr"
|
||||||
android:icon="@drawable/ic_import"
|
|
||||||
android:title="@string/import_by_qr_code"
|
android:title="@string/import_by_qr_code"
|
||||||
app:showAsAction="never" />
|
app:showAsAction="never" />
|
||||||
|
|
||||||
@@ -140,7 +136,6 @@
|
|||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/menu_help"
|
android:id="@+id/menu_help"
|
||||||
android:icon="@drawable/ic_help"
|
|
||||||
android:title="@string/help"
|
android:title="@string/help"
|
||||||
app:showAsAction="never" />
|
app:showAsAction="never" />
|
||||||
|
|
||||||
|
|||||||
@@ -50,28 +50,11 @@
|
|||||||
<item name="cornerSize">50%</item>
|
<item name="cornerSize">50%</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Style.NavigationView" parent="android:Widget">
|
|
||||||
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<style name="Style.Toolbar.NoPadding" parent="Base.Widget.AppCompat.Toolbar">
|
|
||||||
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<style name="Style.MenuItemText" parent="TextAppearance.Material3.BodyLarge">
|
|
||||||
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<style name="Activity.Permission" parent="Theme.Material3.DayNight.NoActionBar">
|
<style name="Activity.Permission" parent="Theme.Material3.DayNight.NoActionBar">
|
||||||
<item name="android:windowBackground">@android:color/transparent</item>
|
<item name="android:windowBackground">@android:color/transparent</item>
|
||||||
<item name="android:windowDisablePreview">true</item>
|
<item name="android:windowDisablePreview">true</item>
|
||||||
<item name="android:windowIsTranslucent">true</item>
|
<item name="android:windowIsTranslucent">true</item>
|
||||||
<item name="android:windowTranslucentStatus">true</item>
|
<item name="android:windowTranslucentStatus">true</item>
|
||||||
<item name="android:windowAnimationStyle">@null</item>
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<style name="ToolbarTitle" parent="@style/TextAppearance.Material3.ActionBar.Title">
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
Reference in new issue
Block a user