Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7ee3e1e5 authored by George Lin's avatar George Lin
Browse files

[TP] Make carousel scale and alpha dimen res

1. Use alpha for the carousel
2. Make the float values dimen resources

Test: manually tested the side items are with alpha
Bug: 270097085
Change-Id: I11ceb236eb6b255e8674c4075350757c43814b17
parent 5577bacd
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -155,4 +155,8 @@
    <dimen name="clock_carousel_item_height">380dp</dimen>
    <dimen name="clock_carousel_item_margin">16dp</dimen>
    <dimen name="clock_carousel_guideline_margin">140dp</dimen>
    <!-- Scale of the carousel items that are not selected and at the side -->
    <dimen name="clock_carousel_scale" format="float">0.5</dimen>
    <!-- Alpha of the carousel items that are not selected and at the side -->
    <dimen name="clock_carousel_alpha" format="float">0.4</dimen>
</resources>
+18 −12
Original line number Diff line number Diff line
@@ -42,8 +42,9 @@
            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"
            android:scaleX="@dimen/clock_carousel_scale"
            android:scaleY="@dimen/clock_carousel_scale"
            android:alpha="@dimen/clock_carousel_alpha"
            motion:layout_constraintEnd_toStartOf="@id/guideline_start"
            motion:layout_constraintTop_toTopOf="parent"
            motion:layout_constraintBottom_toBottomOf="parent" />
@@ -61,8 +62,9 @@
            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"
            android:scaleX="@dimen/clock_carousel_scale"
            android:scaleY="@dimen/clock_carousel_scale"
            android:alpha="@dimen/clock_carousel_alpha"
            motion:layout_constraintStart_toStartOf="@id/guideline_end"
            motion:layout_constraintTop_toTopOf="parent"
            motion:layout_constraintBottom_toBottomOf="parent" />
@@ -73,8 +75,9 @@
            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"
            android:scaleX="@dimen/clock_carousel_scale"
            android:scaleY="@dimen/clock_carousel_scale"
            android:alpha="@dimen/clock_carousel_alpha"
            motion:layout_constraintEnd_toStartOf="@id/guideline_start"
            motion:layout_constraintTop_toTopOf="parent"
            motion:layout_constraintBottom_toBottomOf="parent" />
@@ -92,8 +95,9 @@
            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"
            android:scaleX="@dimen/clock_carousel_scale"
            android:scaleY="@dimen/clock_carousel_scale"
            android:alpha="@dimen/clock_carousel_alpha"
            motion:layout_constraintStart_toStartOf="@id/guideline_end"
            motion:layout_constraintTop_toTopOf="parent"
            motion:layout_constraintBottom_toBottomOf="parent" />
@@ -104,8 +108,9 @@
            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"
            android:scaleX="@dimen/clock_carousel_scale"
            android:scaleY="@dimen/clock_carousel_scale"
            android:alpha="@dimen/clock_carousel_alpha"
            motion:layout_constraintEnd_toStartOf="@id/guideline_start"
            motion:layout_constraintTop_toTopOf="parent"
            motion:layout_constraintBottom_toBottomOf="parent" />
@@ -123,8 +128,9 @@
            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"
            android:scaleX="@dimen/clock_carousel_scale"
            android:scaleY="@dimen/clock_carousel_scale"
            android:alpha="@dimen/clock_carousel_alpha"
            motion:layout_constraintStart_toStartOf="@id/guideline_end"
            motion:layout_constraintTop_toTopOf="parent"
            motion:layout_constraintBottom_toBottomOf="parent" />