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

Commit 11e7da85 authored by George Lin's avatar George Lin Committed by Android (Google) Code Review
Browse files

Merge "Make sure initial state when secondary screen (2/2)" into main

parents 45e228ee c45020c7
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -29,6 +29,21 @@
        android:clipToPadding="false"
        android:clipChildren="false">

        <!--
        This is 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.

        It's critical for any TextViews inside the included layout to have text.
        -->
        <include
            layout="@layout/quick_affordance_list_item_placeholder"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:visibility="invisible" />

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/quick_affordance_horizontal_list"
            android:layout_width="wrap_content"
+27 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?><!--
  ~ Copyright (C) 2025 The Android Open Source Project
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:orientation="vertical">

    <include layout="@layout/quick_affordance_list_item2" />

    <View android:layout_width="match_parent" android:layout_height="@dimen/floating_sheet_list_item_vertical_space" />

    <include layout="@layout/quick_affordance_list_item2" />
</LinearLayout>
 No newline at end of file
+12 −9
Original line number Diff line number Diff line
@@ -210,12 +210,15 @@ object ShortcutFloatingSheetBinder {
            layoutManager = GridLayoutManager(context, 2, GridLayoutManager.HORIZONTAL, false)
            addItemDecoration(
                DoubleRowListItemSpacing(
                    edgeItemSpacePx =
                        context.resources.getDimensionPixelSize(
                            R.dimen.floating_sheet_content_horizontal_padding
                        ),
                    itemHorizontalSpacePx =
                        context.resources.getDimensionPixelSize(
                            R.dimen.floating_sheet_list_item_horizontal_space
                        ),
                    itemVerticalSpacePx =
                        context.resources.getDimensionPixelSize(
                            R.dimen.floating_sheet_list_item_vertical_space
                        ),