Adjust tool bar tab dimension (1/2)
Make the dimens of the tool bar tab conform with the design
Test: Manually make sure the UI looks correct
Bug: 350718184
Flag: com.android.systemui.shared.new_customization_picker_ui
Change-Id: I117f40c61bc776a923b1f8642c0383b926a3f46e
diff --git a/res/layout/floating_sheet_clock.xml b/res/layout/floating_sheet_clock.xml
index 75afce6..ec2e6c1 100644
--- a/res/layout/floating_sheet_clock.xml
+++ b/res/layout/floating_sheet_clock.xml
@@ -189,7 +189,8 @@
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_gravity="center_horizontal"
- android:layout_marginVertical="@dimen/floating_sheet_tab_toolbar_vertical_margin">
+ android:layout_marginTop="@dimen/floating_sheet_tab_clock_font_toolbar_top_margin"
+ android:layout_marginBottom="@dimen/floating_sheet_tab_clock_font_toolbar_bottom_margin">
<ImageView
android:id="@+id/clock_font_revert"
@@ -197,6 +198,7 @@
android:layout_height="wrap_content"
android:src="@drawable/clock_font_revert"
android:contentDescription="@string/clock_font_editor_revert" />
+
<ImageView
android:id="@+id/clock_font_apply"
android:layout_width="wrap_content"
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index d8d30d3..e5d21ea 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -185,6 +185,8 @@
<dimen name="floating_sheet_content_horizontal_padding">20dp</dimen>
<dimen name="floating_sheet_horizontal_padding">16dp</dimen>
<dimen name="floating_sheet_tab_toolbar_vertical_margin">8dp</dimen>
+ <dimen name="floating_sheet_tab_clock_font_toolbar_top_margin">16dp</dimen>
+ <dimen name="floating_sheet_tab_clock_font_toolbar_bottom_margin">8dp</dimen>
<dimen name="floating_sheet_list_item_horizontal_space">4dp</dimen>
<dimen name="floating_sheet_list_item_vertical_space">4dp</dimen>
<dimen name="floating_sheet_clock_style_option_size">82dp</dimen>
diff --git a/src/com/android/wallpaper/customization/ui/binder/ClockFloatingSheetBinder.kt b/src/com/android/wallpaper/customization/ui/binder/ClockFloatingSheetBinder.kt
index bb66831..2d53c0e 100644
--- a/src/com/android/wallpaper/customization/ui/binder/ClockFloatingSheetBinder.kt
+++ b/src/com/android/wallpaper/customization/ui/binder/ClockFloatingSheetBinder.kt
@@ -104,12 +104,12 @@
val clockFontContent =
view.requireViewById<ViewGroup>(R.id.clock_floating_sheet_font_content)
val clockFontToolbar = view.requireViewById<ViewGroup>(R.id.clock_font_toolbar)
- clockFontToolbar
- .requireViewById<View>(R.id.clock_font_revert)
- .setOnClickListener(View.OnClickListener { viewModel.revertFontAxes() })
- clockFontToolbar
- .requireViewById<View>(R.id.clock_font_apply)
- .setOnClickListener(View.OnClickListener { viewModel.applyFontAxes() })
+ clockFontToolbar.requireViewById<View>(R.id.clock_font_revert).setOnClickListener {
+ viewModel.revertFontAxes()
+ }
+ clockFontToolbar.requireViewById<View>(R.id.clock_font_apply).setOnClickListener {
+ viewModel.applyFontAxes()
+ }
// Clock color
val clockColorContent = view.requireViewById<View>(R.id.clock_floating_sheet_color_content)
diff --git a/src/com/android/wallpaper/customization/ui/viewmodel/ClockPickerViewModel.kt b/src/com/android/wallpaper/customization/ui/viewmodel/ClockPickerViewModel.kt
index 71b31c2..11124f9 100644
--- a/src/com/android/wallpaper/customization/ui/viewmodel/ClockPickerViewModel.kt
+++ b/src/com/android/wallpaper/customization/ui/viewmodel/ClockPickerViewModel.kt
@@ -91,7 +91,7 @@
contentDescription = Text.Resource(R.string.clock_style),
),
context.getString(R.string.clock_style),
- it == Tab.STYLE,
+ it == Tab.STYLE || it == Tab.FONT,
) {
_selectedTab.value = Tab.STYLE
},