Remove clipping and stabilize lock preview screen
The diff removes the clipping from the color picker ticks and adds a fake view to stabilize the
preview for lock screen in order to see the shortcut links
video: https://drive.google.com/file/d/1q1bdU3PjkTlQsKVzMSlVGd7NVZOzr9yy/view?usp=share_link&resourcekey=0-UUqq4QT8JCt6KDIx3ztzRg
Bug: 276005686
Test: manual
Change-Id: I008911ec9954293b894dc73221fc075c7c72cbb0
diff --git a/res/layout/fragment_clock_settings.xml b/res/layout/fragment_clock_settings.xml
index 3778698..2047a84 100644
--- a/res/layout/fragment_clock_settings.xml
+++ b/res/layout/fragment_clock_settings.xml
@@ -102,22 +102,45 @@
android:orientation="vertical"
android:clipChildren="false">
- <HorizontalScrollView
- android:id="@+id/color_options_scroll_view"
+ <FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:scrollbars="none">
- <LinearLayout
- android:id="@+id/color_options"
- android:clipToPadding="false"
- android:paddingHorizontal="16dp"
- android:layout_marginBottom="16dp"
+ android:clipChildren="false">
+
+ <HorizontalScrollView
+ android:id="@+id/color_options_scroll_view"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:clipChildren="false"
+ android:scrollbars="none">
+
+ <LinearLayout
+ android:id="@+id/color_options"
+ android:clipToPadding="false"
+ android:clipChildren="false"
+ android:paddingHorizontal="16dp"
+ android:layout_marginBottom="16dp"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ android:divider="@drawable/horizontal_divider_8dp"
+ android:showDividers="middle" />
+ </HorizontalScrollView>
+
+ <!--
+ This is just an invisible placeholder put in place so that the parent keeps
+ its height stable as the RecyclerView updates from 0 items to N items.
+ Keeping it stable allows the layout logic to keep the size of the preview
+ container stable as well, which bodes well for setting up the SurfaceView
+ for remote rendering without changing its size after the content is loaded
+ into the RecyclerView.
+ -->
+ <include
+ layout="@layout/clock_color_option"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:divider="@drawable/horizontal_divider_8dp"
- android:showDividers="middle"/>
- </HorizontalScrollView>
+ android:visibility="invisible" />
+ </FrameLayout>
<SeekBar
android:id="@+id/slider"