为亮暗色模式添加底部按钮
This commit is contained in:
7 files changed
+86
-55
No files matched your search
@@ -183,14 +183,12 @@
|
||||
android:id="@+id/bottom_view"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:overflowMode="menu"
|
||||
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>
|
||||
android:orientation="horizontal"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -1,45 +1,56 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingVertical="8dp">
|
||||
|
||||
<!-- 图标 -->
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/ivIcon"
|
||||
style="@style/Widget.Material3Expressive.Button.IconButton.Tonal"
|
||||
android:layout_width="wrap_content"
|
||||
app:strokeWidth="0dp"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginVertical="8dp">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="false" />
|
||||
android:clickable="true"
|
||||
android:background="?attr/colorSurface"
|
||||
android:foreground="?attr/selectableItemBackground"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingVertical="8dp">
|
||||
|
||||
<!-- 按钮名称 -->
|
||||
<TextView
|
||||
android:id="@+id/tvName"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_weight="1"
|
||||
android:text=""
|
||||
android:textColor="?attr/colorOnSurface"
|
||||
android:textSize="16sp" />
|
||||
<!-- 图标 -->
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/ivIcon"
|
||||
style="@style/Widget.Material3Expressive.Button.IconButton.Tonal"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="false" />
|
||||
|
||||
<!-- 禁用/隐藏按钮 -->
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnDisable"
|
||||
style="@style/Widget.Material3Expressive.Button.IconButton.Outlined"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
app:icon="@drawable/ic_visibility_on" />
|
||||
<!-- 按钮名称 -->
|
||||
<TextView
|
||||
android:id="@+id/tvName"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_weight="1"
|
||||
android:text=""
|
||||
android:textColor="?attr/colorOnSurface"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:src="@drawable/ic_drag_handle" />
|
||||
<!-- 禁用/隐藏按钮 -->
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnDisable"
|
||||
style="@style/Widget.Material3Expressive.Button.IconButton.Outlined"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
app:icon="@drawable/ic_visibility_on" />
|
||||
|
||||
</LinearLayout>
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:src="@drawable/ic_drag_handle" />
|
||||
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
@@ -172,20 +172,17 @@
|
||||
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"
|
||||
app:overflowMode="menu"
|
||||
android:paddingVertical="8dp"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:background="?attr/colorSurfaceContainer"
|
||||
android:orientation="horizontal"/>
|
||||
|
||||
|
||||
</com.google.android.material.button.MaterialButtonGroup>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -1300,4 +1300,5 @@
|
||||
<string name="restart_required_message">此更改需要重启应用才能生效,是否立即重启?</string>
|
||||
<string name="restart_later_message">更改将在下次启动应用时生效</string>
|
||||
<string name="search_select_group">选择书源分组</string>
|
||||
<string name="day_night_switch">深浅色模式开关</string>
|
||||
</resources>
|
||||
@@ -1301,4 +1301,5 @@
|
||||
<string name="restart_required_message">修改该选项需要重启</string>
|
||||
<string name="restart_later_message">稍后重启</string>
|
||||
<string name="search_select_group">选择书源分组</string>
|
||||
<string name="day_night_switch">深浅色模式开关</string>
|
||||
</resources>
|
||||
Reference in new issue
Block a user