增加阅读菜单透明度调整 #81

This commit is contained in:
HapeLee committed 2025-10-12 13:14:45 +08:00
1 parent 16558242d8
commit 554dbb3e1e
9 files changed
+159 -136

No files matched your search

+62 -70
View File
@@ -20,7 +20,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorSurfaceContainer"
android:alpha="0.92"
app:layout_constraintTop_toTopOf="parent">
<LinearLayout
@@ -121,85 +120,78 @@
android:id="@+id/bottom_menu"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:alpha="0.92"
android:orientation="horizontal"
android:background="@android:color/transparent"
app:layout_constraintBottom_toBottomOf="parent">
<LinearLayout
android:id="@+id/ll_bottom_bg"
android:layout_width="match_parent"
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2" />
<!--章节设置-->
<LinearLayout
android:id="@+id/ll_slider"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:layout_marginVertical="8dp"
android:importantForAccessibility="no"
android:gravity="center"
android:orientation="horizontal">
<com.google.android.material.button.MaterialButton
android:id="@+id/tv_pre"
style="@style/Widget.Material3Expressive.Button.IconButton.Tonal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:importantForAccessibility="no"
android:orientation="horizontal">
android:clickable="true"
android:enabled="false"
android:focusable="true"
app:icon="@drawable/ic_previous"
android:contentDescription="@string/previous_chapter"
tools:ignore="TouchTargetSizeCheck" />
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2" />
<!--章节设置-->
<LinearLayout
android:layout_width="0dp"
<com.google.android.material.card.MaterialCardView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
app:cardCornerRadius="32dp"
app:cardBackgroundColor="?attr/colorSurfaceContainer"
app:strokeWidth="0dp">
<com.google.android.material.slider.Slider
android:id="@+id/seek_read_page"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="2"
android:layout_marginVertical="8dp"
android:importantForAccessibility="no"
android:gravity="center"
android:orientation="horizontal">
android:layout_gravity="center_vertical"/>
</com.google.android.material.card.MaterialCardView>
<com.google.android.material.button.MaterialButton
android:id="@+id/tv_pre"
style="@style/Widget.Material3Expressive.Button.IconButton.Tonal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="true"
android:enabled="false"
android:focusable="true"
app:icon="@drawable/ic_previous"
android:contentDescription="@string/previous_chapter"
tools:ignore="TouchTargetSizeCheck" />
<com.google.android.material.button.MaterialButton
android:id="@+id/tv_next"
style="@style/Widget.Material3Expressive.Button.IconButton.Tonal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="true"
android:enabled="false"
android:focusable="true"
app:icon="@drawable/ic_next"
android:contentDescription="@string/next_chapter"
tools:ignore="TouchTargetSizeCheck"/>
</LinearLayout>
<com.google.android.material.card.MaterialCardView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
app:cardCornerRadius="32dp"
app:cardBackgroundColor="?attr/colorSurfaceContainer"
app:strokeWidth="0dp">
<com.google.android.material.slider.Slider
android:id="@+id/seek_read_page"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"/>
</com.google.android.material.card.MaterialCardView>
<com.google.android.material.button.MaterialButtonGroup
android:id="@+id/bottom_view"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:importantForAccessibility="no"
android:paddingVertical="8dp"
android:gravity="center"
android:paddingHorizontal="16dp"
android:orientation="horizontal">
<com.google.android.material.button.MaterialButton
android:id="@+id/tv_next"
style="@style/Widget.Material3Expressive.Button.IconButton.Tonal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="true"
android:enabled="false"
android:focusable="true"
app:icon="@drawable/ic_next"
android:contentDescription="@string/next_chapter"
tools:ignore="TouchTargetSizeCheck"/>
</LinearLayout>
</com.google.android.material.button.MaterialButtonGroup>
<com.google.android.material.button.MaterialButtonGroup
android:id="@+id/bottom_view"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:importantForAccessibility="no"
android:paddingVertical="8dp"
android:gravity="center"
android:paddingHorizontal="16dp"
android:orientation="horizontal">
</com.google.android.material.button.MaterialButtonGroup>
</LinearLayout>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
+57 -65
View File
@@ -20,7 +20,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorSurfaceContainer"
android:alpha="0.92"
app:layout_constraintTop_toTopOf="parent">
<LinearLayout
@@ -118,82 +117,75 @@
android:id="@+id/bottom_menu"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:alpha="0.92"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent">
<LinearLayout
android:id="@+id/ll_bottom_bg"
android:layout_width="match_parent"
<!--章节设置-->
<LinearLayout
android:id="@+id/ll_slider"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="8dp"
android:layout_marginHorizontal="16dp"
android:importantForAccessibility="no"
android:gravity="center"
android:orientation="horizontal">
<com.google.android.material.button.MaterialButton
android:id="@+id/tv_pre"
style="@style/Widget.Material3Expressive.Button.IconButton.Tonal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:importantForAccessibility="no"
android:orientation="vertical">
<!--章节设置-->
<LinearLayout
android:clickable="true"
android:enabled="false"
android:focusable="true"
app:icon="@drawable/ic_previous"
android:contentDescription="@string/previous_chapter"
tools:ignore="TouchTargetSizeCheck" />
<com.google.android.material.card.MaterialCardView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
app:cardCornerRadius="32dp"
app:cardBackgroundColor="?attr/colorSurfaceContainer"
app:strokeWidth="0dp">
<com.google.android.material.slider.Slider
android:id="@+id/seek_read_page"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="8dp"
android:layout_marginHorizontal="16dp"
android:importantForAccessibility="no"
android:gravity="center"
android:orientation="horizontal">
<com.google.android.material.button.MaterialButton
android:id="@+id/tv_pre"
style="@style/Widget.Material3Expressive.Button.IconButton.Tonal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="true"
android:enabled="false"
android:focusable="true"
app:icon="@drawable/ic_previous"
android:contentDescription="@string/previous_chapter"
tools:ignore="TouchTargetSizeCheck" />
<com.google.android.material.card.MaterialCardView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
app:cardCornerRadius="32dp"
app:cardBackgroundColor="?attr/colorSurfaceContainer"
app:strokeWidth="0dp">
<com.google.android.material.slider.Slider
android:id="@+id/seek_read_page"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"/>
</com.google.android.material.card.MaterialCardView>
android:layout_gravity="center_vertical"/>
</com.google.android.material.card.MaterialCardView>
<com.google.android.material.button.MaterialButton
android:id="@+id/tv_next"
style="@style/Widget.Material3Expressive.Button.IconButton.Tonal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="true"
android:enabled="false"
android:focusable="true"
app:icon="@drawable/ic_next"
android:contentDescription="@string/next_chapter"
tools:ignore="TouchTargetSizeCheck"/>
</LinearLayout>
<com.google.android.material.button.MaterialButton
android:id="@+id/tv_next"
style="@style/Widget.Material3Expressive.Button.IconButton.Tonal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="true"
android:enabled="false"
android:focusable="true"
app:icon="@drawable/ic_next"
android:contentDescription="@string/next_chapter"
tools:ignore="TouchTargetSizeCheck"/>
</LinearLayout>
<com.google.android.material.button.MaterialButtonGroup
android:id="@+id/bottom_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:importantForAccessibility="no"
android:paddingVertical="8dp"
android:paddingHorizontal="16dp"
android:background="?attr/colorSurfaceContainer"
android:gravity="center"
android:orientation="horizontal">
<com.google.android.material.button.MaterialButtonGroup
android:id="@+id/bottom_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:importantForAccessibility="no"
android:paddingVertical="8dp"
android:paddingHorizontal="16dp"
android:background="?attr/colorSurfaceContainer"
android:gravity="center"
android:orientation="horizontal">
</com.google.android.material.button.MaterialButtonGroup>
</LinearLayout>
</com.google.android.material.button.MaterialButtonGroup>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
+2
View File
@@ -1286,4 +1286,6 @@
<string name="delay_book_load">延缓书籍加载</string>
<string name="compact_list">紧凑列表</string>
<string name="author_read">%s • %d章未读</string>
<string name="menu_alpha_sum">当前 %d%%</string>
<string name="menu_alpha">菜单透明度</string>
</resources>
+2
View File
@@ -1287,4 +1287,6 @@
<string name="delay_book_load">Delay Book Loading</string>
<string name="compact_list">Compact List</string>
<string name="author_read">%s • %dNot read</string>
<string name="menu_alpha_sum">Current %d%%</string>
<string name="menu_alpha">Menu transparency</string>
</resources>
@@ -28,6 +28,13 @@
app:iconSpaceReserved="false"
app:isBottomBackground="true" />
<io.legato.kazusa.lib.prefs.Preference
android:key="menuAlpha"
android:summary="@string/menu_alpha_sum"
android:title="@string/menu_alpha"
app:iconSpaceReserved="false"
app:isBottomBackground="true" />
<io.legato.kazusa.lib.prefs.SwitchPreference
android:defaultValue="false"
android:key="hideStatusBar"