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

Commit 9aacde01 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 12730974 from 24920479 to 25Q2-release

Change-Id: I7af01fcde93fdbacaac87295c6b51ea26dc4fc6e
parents f9f6934c 24920479
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -55,13 +55,12 @@
        android:layout_marginHorizontal="24dp"
        android:layout_marginBottom="28dp"
        android:background="@drawable/picker_fragment_background"
        android:paddingBottom="62dp"
        android:clipChildren="false">

        <FrameLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="22dp"
            android:layout_marginVertical="20dp"
            android:clipChildren="false">

            <androidx.recyclerview.widget.RecyclerView
+3 −2
Original line number Diff line number Diff line
@@ -47,8 +47,8 @@

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

    </FrameLayout>
@@ -64,6 +64,7 @@
        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" />

+63 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2024 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:background="@drawable/option_item_background"
            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>
+1 −0
Original line number Diff line number Diff line
@@ -189,6 +189,7 @@
    <dimen name="floating_sheet_tab_clock_font_toolbar_top_margin">16dp</dimen>
    <dimen name="floating_sheet_tab_clock_font_toolbar_bottom_margin">8dp</dimen>
    <dimen name="floating_sheet_list_item_horizontal_space">4dp</dimen>
    <dimen name="floating_sheet_grid_list_item_horizontal_space">10dp</dimen>
    <dimen name="floating_sheet_list_item_vertical_space">4dp</dimen>
    <dimen name="floating_sheet_clock_style_option_list_margin_bottom">8dp</dimen>
    <dimen name="floating_sheet_clock_style_option_width">80dp</dimen>
+6 −7
Original line number Diff line number Diff line
@@ -36,6 +36,9 @@ import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.launch

object GridScreenBinder {

    const val GRID_ITEM_SPACING_DP = 20

    fun bind(
        view: View,
        viewModel: GridScreenViewModel,
@@ -47,12 +50,8 @@ object GridScreenBinder {
    ) {
        val optionView: RecyclerView = view.requireViewById(com.android.wallpaper.R.id.options)
        optionView.layoutManager =
            LinearLayoutManager(
                view.context,
                RecyclerView.HORIZONTAL,
                /* reverseLayout= */ false,
            )
        optionView.addItemDecoration(ItemSpacing(ItemSpacing.ITEM_SPACING_DP))
            LinearLayoutManager(view.context, RecyclerView.HORIZONTAL, /* reverseLayout= */ false)
        optionView.addItemDecoration(ItemSpacing(GRID_ITEM_SPACING_DP))
        val adapter =
            OptionItemAdapter(
                layoutResourceId = R.layout.grid_option,
@@ -68,7 +67,7 @@ object GridScreenBinder {
                bindIcon = { foregroundView: View, gridIcon: GridIconViewModel ->
                    val imageView = foregroundView as? ImageView
                    imageView?.let { GridIconViewBinder.bind(imageView, gridIcon) }
                }
                },
            )
        optionView.adapter = adapter

Loading