[TP] Fix carousel scaling
1. The side clock should scale down
2. Adjust the position of the clocks at side
Test: Manually tested that the scaling works
https://drive.google.com/file/d/1a1Ld4OlrQ996-9DW5rfyikQlbU157TrC/view?usp=sharing&resourcekey=0-Jxij97n5R4vT6lUZ6EupvQ
Bug: 269796258
Change-Id: I8e1531b2960ce63025be3c7c34df80d414ba2904
diff --git a/res/layout/clock_carousel.xml b/res/layout/clock_carousel.xml
index cfc7e4e..35defd6 100644
--- a/res/layout/clock_carousel.xml
+++ b/res/layout/clock_carousel.xml
@@ -111,12 +111,12 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
- app:layout_constraintGuide_begin="100dp" />
+ app:layout_constraintGuide_begin="@dimen/clock_carousel_guideline_margin" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline_end"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
- app:layout_constraintGuide_end="100dp" />
+ app:layout_constraintGuide_end="@dimen/clock_carousel_guideline_margin" />
</androidx.constraintlayout.motion.widget.MotionLayout>
\ No newline at end of file
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index f79d9b1..30d71e3 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -154,4 +154,5 @@
<dimen name="clock_carousel_item_width">190dp</dimen>
<dimen name="clock_carousel_item_height">380dp</dimen>
<dimen name="clock_carousel_item_margin">16dp</dimen>
+ <dimen name="clock_carousel_guideline_margin">140dp</dimen>
</resources>
diff --git a/res/xml/carousel_scene.xml b/res/xml/carousel_scene.xml
index 8c6738b..d94f32b 100644
--- a/res/xml/carousel_scene.xml
+++ b/res/xml/carousel_scene.xml
@@ -42,6 +42,8 @@
android:id="@+id/item_view_0"
android:layout_width="@dimen/clock_carousel_item_width"
android:layout_height="@dimen/clock_carousel_item_height"
+ android:scaleX="0.5"
+ android:scaleY="0.5"
motion:layout_constraintEnd_toStartOf="@id/guideline_start"
motion:layout_constraintTop_toTopOf="parent"
motion:layout_constraintBottom_toBottomOf="parent" />
@@ -59,6 +61,8 @@
android:id="@+id/item_view_2"
android:layout_width="@dimen/clock_carousel_item_width"
android:layout_height="@dimen/clock_carousel_item_height"
+ android:scaleX="0.5"
+ android:scaleY="0.5"
motion:layout_constraintStart_toStartOf="@id/guideline_end"
motion:layout_constraintTop_toTopOf="parent"
motion:layout_constraintBottom_toBottomOf="parent" />
@@ -69,6 +73,8 @@
android:id="@+id/item_view_1"
android:layout_width="@dimen/clock_carousel_item_width"
android:layout_height="@dimen/clock_carousel_item_height"
+ android:scaleX="0.5"
+ android:scaleY="0.5"
motion:layout_constraintEnd_toStartOf="@id/guideline_start"
motion:layout_constraintTop_toTopOf="parent"
motion:layout_constraintBottom_toBottomOf="parent" />
@@ -86,6 +92,8 @@
android:id="@+id/item_view_3"
android:layout_width="@dimen/clock_carousel_item_width"
android:layout_height="@dimen/clock_carousel_item_height"
+ android:scaleX="0.5"
+ android:scaleY="0.5"
motion:layout_constraintStart_toStartOf="@id/guideline_end"
motion:layout_constraintTop_toTopOf="parent"
motion:layout_constraintBottom_toBottomOf="parent" />
@@ -96,6 +104,8 @@
android:id="@+id/item_view_2"
android:layout_width="@dimen/clock_carousel_item_width"
android:layout_height="@dimen/clock_carousel_item_height"
+ android:scaleX="0.5"
+ android:scaleY="0.5"
motion:layout_constraintEnd_toStartOf="@id/guideline_start"
motion:layout_constraintTop_toTopOf="parent"
motion:layout_constraintBottom_toBottomOf="parent" />
@@ -113,6 +123,8 @@
android:id="@+id/item_view_4"
android:layout_width="@dimen/clock_carousel_item_width"
android:layout_height="@dimen/clock_carousel_item_height"
+ android:scaleX="0.5"
+ android:scaleY="0.5"
motion:layout_constraintStart_toStartOf="@id/guideline_end"
motion:layout_constraintTop_toTopOf="parent"
motion:layout_constraintBottom_toBottomOf="parent" />