HapeLee 1 год назад
Родитель
Сommit
a0ca182910

+ 2 - 5
app/src/main/java/io/legado/app/ui/book/toc/ChapterListAdapter.kt

@@ -278,22 +278,19 @@ class ChapterListAdapter(
             when {
                 item.isVolume -> {
                     ivVolume.visible()
-                    if (isCollapsed) ivColl.visible()
-                    else ivColl.gone()
+                    ivVolume.isChecked = isCollapsed
                     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))
                 }
 
                 isDur -> {
-                    ivColl.gone()
                     ivVolume.gone()
                     tvChapterName.setTextColor(context.themeColor(androidx.appcompat.R.attr.colorPrimary))
                     tvChapterItem.setBackgroundColor(context.themeColor(com.google.android.material.R.attr.colorSurfaceContainer))
                 }
 
                 else -> {
-                    ivColl.gone()
                     ivVolume.gone()
                     tvChapterName.setTextColor(context.themeColor(com.google.android.material.R.attr.colorOnSurface))
                     tvChapterItem.setBackgroundColor(context.themeColor(com.google.android.material.R.attr.colorSurface))

+ 1 - 0
app/src/main/res/layout/dialog_content_edit.xml

@@ -17,6 +17,7 @@
         android:id="@+id/scrollView"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
+        android:paddingBottom="32dp"
         app:layout_constraintTop_toBottomOf="@id/tool_bar">
 
         <io.legado.app.ui.widget.text.TextInputLayout

+ 12 - 23
app/src/main/res/layout/item_chapter_list.xml

@@ -27,14 +27,20 @@
             android:src="@drawable/ic_lock_outline"
             android:visibility="visible" />
 
-        <com.google.android.material.card.MaterialCardView
+        <com.google.android.material.button.MaterialButton
             android:id="@+id/iv_volume"
-            android:layout_width="4dp"
-            android:layout_height="16dp"
+            android:layout_width="18dp"
+            android:layout_height="26dp"
             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"
-            app:cardBackgroundColor="?attr/colorTertiary"
-            app:strokeWidth="0dp" />
+            app:icon="@drawable/m3_split_button_chevron_avd" />
+
     </LinearLayout>
 
     <LinearLayout
@@ -43,7 +49,7 @@
         android:layout_height="wrap_content"
         android:orientation="vertical"
         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_constraintStart_toEndOf="@id/ll_info">
 
@@ -85,23 +91,6 @@
             app:layout_constraintTop_toBottomOf="@id/tv_word_count" />
     </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
         android:id="@+id/iv_checked"
         android:layout_width="24dp"