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

Commit 9dc20213 authored by Catherine Liang's avatar Catherine Liang Committed by Android (Google) Code Review
Browse files

Merge "Create new icons UI floating tabs" into main

parents b7fea668 43f59d54
Loading
Loading
Loading
Loading
+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.
  ~
  -->

<vector
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="24dp"
    android:height="24dp"
    android:viewportWidth="960"
    android:viewportHeight="960">
    <path
        android:fillColor="@android:color/white"
        android:pathData="M360,640Q243,640 161.5,558.5Q80,477 80,360Q80,243 161.5,161.5Q243,80 360,80Q477,80 558.5,161.5Q640,243 640,360Q640,477 558.5,558.5Q477,640 360,640ZM320,800L320,718Q330,719 340,719.5Q350,720 360,720Q510,720 615,615Q720,510 720,360Q720,350 719.5,340Q719,330 718,320L800,320Q833,320 856.5,343.5Q880,367 880,400L880,800Q880,833 856.5,856.5Q833,880 800,880L400,880Q367,880 343.5,856.5Q320,833 320,800Z"/>
</vector>
 No newline at end of file
+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.
  ~
  -->

<vector
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="24dp"
    android:height="24dp"
    android:viewportWidth="960"
    android:viewportHeight="960">
    <path
        android:fillColor="@android:color/white"
        android:pathData="M159,792L125,778Q94,765 83.5,733Q73,701 87,670L159,514L159,792ZM319,880Q286,880 262.5,856.5Q239,833 239,800L239,560L345,854Q348,861 351,867.5Q354,874 359,880L319,880ZM525,876Q493,888 463,873Q433,858 421,826L243,338Q231,306 245,275.5Q259,245 291,234L593,124Q625,112 655,127Q685,142 697,174L875,662Q887,694 873,724.5Q859,755 827,766L525,876ZM439,400Q456,400 467.5,388.5Q479,377 479,360Q479,343 467.5,331.5Q456,320 439,320Q422,320 410.5,331.5Q399,343 399,360Q399,377 410.5,388.5Q422,400 439,400Z"/>
</vector>
 No newline at end of file
+121 −74
Original line number Diff line number Diff line
@@ -16,16 +16,54 @@

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:paddingHorizontal="@dimen/floating_sheet_horizontal_padding"
    android:orientation="vertical">

    <LinearLayout
        android:id="@+id/floating_sheet_content_container"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
    android:layout_marginHorizontal="@dimen/floating_sheet_horizontal_padding"
        android:paddingVertical="@dimen/floating_sheet_content_vertical_padding"
        android:background="@drawable/floating_sheet_content_background"
        android:orientation="vertical"
        android:clipToPadding="false"
        android:clipChildren="false">

        <FrameLayout
            android:id="@+id/app_icon_style_container"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginBottom="12dp"
            android:clipToPadding="false"
            android:clipChildren="false"
            android:visibility="gone">

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

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

            <androidx.recyclerview.widget.RecyclerView
                android:id="@+id/icon_style_options"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_horizontal"
                android:clipToPadding="false"
                android:clipChildren="false" />
        </FrameLayout>

        <FrameLayout
            android:id="@+id/app_shape_container"
            android:layout_width="match_parent"
@@ -108,3 +146,12 @@
                android:theme="@style/Theme.Material3.DynamicColors.DayNight" />
        </androidx.constraintlayout.widget.ConstraintLayout>
    </LinearLayout>

    <com.android.wallpaper.picker.customization.ui.view.FloatingToolbar
        android:id="@+id/floating_toolbar"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center_horizontal"
        android:layout_marginVertical="@dimen/floating_sheet_tab_toolbar_vertical_margin"
        android:visibility="gone" />
</LinearLayout>
 No newline at end of file
+62 −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"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="@dimen/option_item_size"
    android:layout_height="wrap_content"
    android:orientation="vertical"
    android:gravity="center_horizontal"
    android:clipChildren="false">

    <FrameLayout
        android:layout_width="@dimen/option_item_size"
        android:layout_height="@dimen/option_item_size"
        android:clipChildren="false">

        <com.android.wallpaper.picker.option.ui.view.OptionItemBackground
            android:id="@id/background"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:importantForAccessibility="no" />

        <ImageView
            android:id="@id/foreground"
            android:layout_width="48dp"
            android:layout_height="48dp"
            android:layout_gravity="center" />

    </FrameLayout>

    <View
        android:layout_width="0dp"
        android:layout_height="8dp" />

    <TextView
        android:id="@id/text"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textColor="@color/system_on_surface"
        android:singleLine="true"
        android:ellipsize="end"
        android:textSize="12sp"
        android:text="Placeholder for stable size calculation, please do not remove."
        tools:ignore="HardcodedText" />

</LinearLayout>
+6 −0
Original line number Diff line number Diff line
@@ -151,6 +151,12 @@
        [CHAR LIMIT=15] -->
    <string name="app_icons_theme_themed">themed</string>

    <!-- Title of a tab to change the app icon shape [CHAR LIMIT=15] -->
    <string name="app_icons_shape">Shape</string>

    <!-- Title of a tab to change the app icon theme [CHAR LIMIT=15] -->
    <string name="app_icons_style">Style</string>

    <!-- Label for a button that allows the user to apply the currently selected Theme.
        [CHAR LIMIT=20] -->
    <string name="apply_theme_btn">Apply</string>
Loading