优化卷显示
This commit is contained in:
3 files changed
+15
-28
No files matched your search
@@ -278,22 +278,19 @@ class ChapterListAdapter(
|
|||||||
when {
|
when {
|
||||||
item.isVolume -> {
|
item.isVolume -> {
|
||||||
ivVolume.visible()
|
ivVolume.visible()
|
||||||
if (isCollapsed) ivColl.visible()
|
ivVolume.isChecked = isCollapsed
|
||||||
else ivColl.gone()
|
|
||||||
tvChapterName.textSize = 12f
|
tvChapterName.textSize = 12f
|
||||||
tvChapterName.setTextColor(context.themeColor(com.google.android.material.R.attr.colorTertiary))
|
tvChapterName.setTextColor(context.themeColor(com.google.android.material.R.attr.colorSecondary))
|
||||||
tvChapterItem.setBackgroundColor(context.themeColor(com.google.android.material.R.attr.colorSurface))
|
tvChapterItem.setBackgroundColor(context.themeColor(com.google.android.material.R.attr.colorSurface))
|
||||||
}
|
}
|
||||||
|
|
||||||
isDur -> {
|
isDur -> {
|
||||||
ivColl.gone()
|
|
||||||
ivVolume.gone()
|
ivVolume.gone()
|
||||||
tvChapterName.setTextColor(context.themeColor(androidx.appcompat.R.attr.colorPrimary))
|
tvChapterName.setTextColor(context.themeColor(androidx.appcompat.R.attr.colorPrimary))
|
||||||
tvChapterItem.setBackgroundColor(context.themeColor(com.google.android.material.R.attr.colorSurfaceContainer))
|
tvChapterItem.setBackgroundColor(context.themeColor(com.google.android.material.R.attr.colorSurfaceContainer))
|
||||||
}
|
}
|
||||||
|
|
||||||
else -> {
|
else -> {
|
||||||
ivColl.gone()
|
|
||||||
ivVolume.gone()
|
ivVolume.gone()
|
||||||
tvChapterName.setTextColor(context.themeColor(com.google.android.material.R.attr.colorOnSurface))
|
tvChapterName.setTextColor(context.themeColor(com.google.android.material.R.attr.colorOnSurface))
|
||||||
tvChapterItem.setBackgroundColor(context.themeColor(com.google.android.material.R.attr.colorSurface))
|
tvChapterItem.setBackgroundColor(context.themeColor(com.google.android.material.R.attr.colorSurface))
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
android:id="@+id/scrollView"
|
android:id="@+id/scrollView"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingBottom="32dp"
|
||||||
app:layout_constraintTop_toBottomOf="@id/tool_bar">
|
app:layout_constraintTop_toBottomOf="@id/tool_bar">
|
||||||
|
|
||||||
<io.legado.app.ui.widget.text.TextInputLayout
|
<io.legado.app.ui.widget.text.TextInputLayout
|
||||||
|
|||||||
@@ -27,14 +27,20 @@
|
|||||||
android:src="@drawable/ic_lock_outline"
|
android:src="@drawable/ic_lock_outline"
|
||||||
android:visibility="visible" />
|
android:visibility="visible" />
|
||||||
|
|
||||||
<com.google.android.material.card.MaterialCardView
|
<com.google.android.material.button.MaterialButton
|
||||||
android:id="@+id/iv_volume"
|
android:id="@+id/iv_volume"
|
||||||
android:layout_width="4dp"
|
android:layout_width="18dp"
|
||||||
android:layout_height="16dp"
|
android:layout_height="26dp"
|
||||||
android:layout_marginEnd="8dp"
|
android:layout_marginEnd="8dp"
|
||||||
|
android:checkable="true"
|
||||||
|
android:clickable="false"
|
||||||
|
app:iconPadding="0dp"
|
||||||
|
app:iconGravity="textStart"
|
||||||
|
app:iconSize="16dp"
|
||||||
|
style="@style/Widget.Material3Expressive.Button.TonalButton"
|
||||||
android:visibility="visible"
|
android:visibility="visible"
|
||||||
app:cardBackgroundColor="?attr/colorTertiary"
|
app:icon="@drawable/m3_split_button_chevron_avd" />
|
||||||
app:strokeWidth="0dp" />
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
@@ -43,7 +49,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toStartOf="@id/iv_Coll"
|
app:layout_constraintEnd_toStartOf="@id/iv_checked"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintStart_toEndOf="@id/ll_info">
|
app:layout_constraintStart_toEndOf="@id/ll_info">
|
||||||
|
|
||||||
@@ -85,23 +91,6 @@
|
|||||||
app:layout_constraintTop_toBottomOf="@id/tv_word_count" />
|
app:layout_constraintTop_toBottomOf="@id/tv_word_count" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<com.google.android.material.card.MaterialCardView
|
|
||||||
android:id="@+id/iv_Coll"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
app:strokeWidth="0dp"
|
|
||||||
app:cardBackgroundColor="?attr/colorSurfaceContainerHighest"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toStartOf="@id/iv_checked">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:visibility="visible"
|
|
||||||
android:src="@drawable/ic_arrow_drop_down" />
|
|
||||||
</com.google.android.material.card.MaterialCardView>
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/iv_checked"
|
android:id="@+id/iv_checked"
|
||||||
android:layout_width="24dp"
|
android:layout_width="24dp"
|
||||||
|
|||||||
Reference in new issue
Block a user