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

Commit 487e510a authored by Prince's avatar Prince Committed by Will Leshner
Browse files

Dream settings UI update

Update dream settings button placement and other updates.

Test: Device tested
Fixes: 349656117
Flag: android.service.dreams.dreams_v2
Change-Id: Iea4d015b0da65b506f84c81e509380ba6db74fb8
parent f9599ebd
Loading
Loading
Loading
Loading
+25 −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.
  -->

<shape
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="oval">
    <solid android:color="@color/settingslib_btn_colored_background_material"/>
    <size
        android:width="24dp"
        android:height="24dp"/>
</shape>
+47 −0
Original line number Diff line number Diff line
@@ -66,6 +66,53 @@
            app:layout_constraintStart_toStartOf="@+id/preview"
            app:layout_constraintEnd_toEndOf="@+id/preview"/>

        <com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
            android:id="@+id/customize_button_new"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginBottom="@dimen/dream_item_customize_button_margin_bottom"
            android:text="@string/customize_button_title"
            android:contentDescription="@string/customize_button_title"
            lineBreakWordStyle="phrase"
            android:textAllCaps="false"
            android:visibility="gone"
            android:textColor="@color/settingslib_btn_colored_text_material"
            android:theme="@style/Theme.CollapsingToolbar.Settings"
            app:backgroundTint="@color/settingslib_btn_colored_background_material"
            app:iconTint="@color/settingslib_btn_colored_text_material"
            app:icon="@drawable/ic_edit"
            app:layout_constraintBottom_toBottomOf="@+id/preview"
            app:layout_constraintStart_toStartOf="@+id/preview"
            app:layout_constraintEnd_toEndOf="@+id/preview"/>

        <FrameLayout
            android:id="@+id/preview_button"
            android:layout_width="@dimen/dream_preview_button_frame_size"
            android:layout_height="@dimen/dream_preview_button_frame_size"
            android:clipChildren="false"
            android:focusable="true"
            android:contentDescription="@string/dream_preview_button_title"
            android:visibility="gone"
            app:layout_constraintTop_toTopOf="@+id/preview"
            app:layout_constraintEnd_toEndOf="@+id/preview">
            <FrameLayout
                android:layout_width="@dimen/dream_preview_button_size"
                android:layout_height="@dimen/dream_preview_button_size"
                android:layout_gravity="center"
                android:background="@drawable/dream_preview_button_background"
                app:backgroundTint="@color/settingslib_btn_colored_background_material"
                android:focusable="false">
                <ImageView
                    android:layout_width="@dimen/dream_preview_button_icon_size"
                    android:layout_height="@dimen/dream_preview_button_icon_size"
                    android:layout_gravity="center"
                    android:background="@drawable/dream_preview_button_background"
                    android:src="@drawable/dream_preview_icon"
                    android:tint="@color/settingslib_btn_colored_text_material"
                    android:tintMode="src_in" />
            </FrameLayout>
        </FrameLayout>

        <TextView
            android:id="@+id/title_text"
            android:layout_width="0dp"
+5 −0
Original line number Diff line number Diff line
@@ -461,6 +461,7 @@
    <dimen name="dream_item_corner_radius">28dp</dimen>
    <dimen name="dream_item_content_padding">8dp</dimen>
    <dimen name="dream_item_icon_size">20dp</dimen>
    <dimen name="dream_preview_small_icon_size">16dp</dimen>
    <dimen name="dream_item_summary_text_size">14sp</dimen>
    <dimen name="dream_item_title_margin_top">16dp</dimen>
    <dimen name="dream_item_title_margin_bottom">8dp</dimen>
@@ -469,6 +470,10 @@
    <dimen name="dream_item_title_margin_horizontal">8dp</dimen>
    <dimen name="dream_preference_card_padding">16dp</dimen>
    <dimen name="dream_preview_placeholder_width">52dp</dimen>
    <dimen name="dream_item_customize_button_margin_bottom">16dp</dimen>
    <dimen name="dream_preview_button_frame_size">48dp</dimen>
    <dimen name="dream_preview_button_size">24dp</dimen>
    <dimen name="dream_preview_button_icon_size">16dp</dimen>

    <!-- Sims/Data mobile/Calls/SMS select dialog-->
    <dimen name="sims_select_margin_bottom">24dp</dimen>
+1 −1
Original line number Diff line number Diff line
@@ -3316,7 +3316,7 @@
    <!-- Display settings screen, summary for screen saver options, screen saver is turned off [CHAR LIMIT=20] -->
    <string name="screensaver_settings_summary_off">Off</string>
    <!-- Dream settings screen, action label, when to dream [CHAR LIMIT=20] -->
    <string name="screensaver_settings_when_to_dream">When to start</string>
    <string name="screensaver_settings_when_to_dream">When to show</string>
    <!-- [CHAR LIMIT=40] Display settings screen, setting option name to change whether the device wakes up when a lift gesture is detected. -->
    <string name="lift_to_wake_title">Lift to wake</string>
    <!-- Title of toggle preference in screensaver "when to start" screen to restrict to starting only when charging wirelessly [CHAR LIMIT=NONE] -->
+6 −1
Original line number Diff line number Diff line
@@ -24,11 +24,13 @@
    <com.android.settingslib.widget.MainSwitchPreference
        android:key="dream_main_settings_switch"
        android:title="@string/screensaver_settings_toggle_title"
        android:order="0"
        settings:controller="com.android.settings.dream.DreamMainSwitchPreferenceController"
        settings:searchable="false"/>

    <PreferenceCategory
        android:title="@string/dream_picker_category">
        android:title="@string/dream_picker_category"
        android:order="100">
        <com.android.settingslib.widget.LayoutPreference
            android:key="dream_picker"
            android:selectable="false"
@@ -38,16 +40,19 @@
    <Preference
        android:key="when_to_start"
        android:title="@string/screensaver_settings_when_to_dream"
        android:order="200"
        android:fragment="com.android.settings.dream.WhenToDreamPicker"/>

    <SwitchPreferenceCompat
        android:key="dream_complications_toggle"
        android:title="@string/dream_complications_toggle_title"
        android:order="300"
        android:summary="@string/dream_complications_toggle_summary"
        settings:controller="com.android.settings.dream.DreamComplicationPreferenceController"/>

    <SwitchPreferenceCompat
        android:key="dream_home_controls_toggle"
        android:order="400"
        android:title="@string/dream_home_controls_toggle_title"
        android:summary="@string/dream_home_controls_toggle_summary" />

Loading