feat: 添加设置页面的双击切换壁纸开关
- 在 SettingsFragment 中添加双击开关控件 - 添加双击设置的加载和保存逻辑 - 在布局文件中添加"交互设置"卡片 - 包含双击开关和说明文字 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
520435831f
commit
ebdb85fa0e
2 files changed
+82
No files matched your search
@@ -214,6 +214,60 @@
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- 双击设置卡片 -->
|
||||
<TextView
|
||||
android:id="@+id/tvDoubleTapSettingsLabel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/spacing_lg"
|
||||
android:text="交互设置"
|
||||
android:textSize="@dimen/text_size_xxl"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/text_primary"
|
||||
app:layout_constraintTop_toBottomOf="@id/cardVideoSettings"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/cardDoubleTapSettings"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/spacing_sm"
|
||||
app:cardElevation="@dimen/card_elevation"
|
||||
app:cardCornerRadius="@dimen/corner_radius_md"
|
||||
app:cardBackgroundColor="@color/bg_card"
|
||||
app:strokeColor="@color/glass_border"
|
||||
app:strokeWidth="@dimen/glass_border_width"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvDoubleTapSettingsLabel"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/card_padding">
|
||||
|
||||
<!-- 启用双击切换 -->
|
||||
<Switch
|
||||
android:id="@+id/switchDoubleTapEnabled"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="启用双击切换壁纸"
|
||||
android:textSize="@dimen/text_size_md"
|
||||
android:textColor="@color/text_primary"
|
||||
android:minHeight="48dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="在桌面双击可快速切换到下一张壁纸"
|
||||
android:textSize="@dimen/text_size_sm"
|
||||
android:textColor="@color/text_secondary" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
Reference in new issue
Block a user