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

Commit f715385b authored by Angela Wang's avatar Angela Wang
Browse files

Refactor: Apply common view styles to hearing device dialog views

Update the layout to align with Figma design and consolidates the styling for various views to use a common set of reusable styles to reduce duplication.

Flag: EXEMPT resource change only
Bug: 417628947
Test: m
Change-Id: Iafe1cb5facac3a619a430d8936d8aa8d2508f784
parent 6e3a287b
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -19,4 +19,7 @@
    android:shape="rectangle">
    <corners android:radius="@dimen/hearing_devices_preset_spinner_background_radius"/>
    <solid android:color="@androidprv:color/materialColorSurfaceContainer" />
    <padding
        android:top="8dp"
        android:bottom="8dp" />
</shape>
 No newline at end of file
+0 −2
Original line number Diff line number Diff line
@@ -16,7 +16,5 @@
-->
<inset xmlns:android="http://schemas.android.com/apk/res/android"
    android:drawable="@drawable/settingslib_switch_bar_bg_on"
    android:insetTop="8dp"
    android:insetBottom="8dp"
    android:insetLeft="11dp"
    android:insetRight="11dp" />
 No newline at end of file
+3 −8
Original line number Diff line number Diff line
@@ -25,8 +25,6 @@
        android:id="@+id/ambient_header"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginStart="@dimen/bluetooth_dialog_layout_margin"
        android:layout_marginEnd="@dimen/bluetooth_dialog_layout_margin"
        android:gravity="center_vertical"
        android:orientation="horizontal">
        <ImageView
@@ -45,11 +43,8 @@
            android:layout_weight="1"
            android:paddingStart="10dp"
            android:text="@string/hearing_devices_ambient_label"
            android:textAppearance="@style/TextAppearance.Dialog.Title"
            android:textDirection="locale"
            android:textSize="16sp"
            android:gravity="center_vertical"
            android:fontFamily="@*android:string/config_headlineFontFamilyMedium" />
            android:textAppearance="@style/TextAppearance.HearingDeviceDialog.Title"
            android:gravity="center_vertical" />
        <ImageView
            android:id="@+id/ambient_expand_icon"
            android:layout_width="48dp"
+6 −8
Original line number Diff line number Diff line
@@ -17,23 +17,21 @@
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginStart="@dimen/bluetooth_dialog_layout_margin"
    android:layout_marginEnd="@dimen/bluetooth_dialog_layout_margin"
    android:layout_marginTop="4dp"
    android:orientation="vertical">

    <TextView
        android:id="@+id/ambient_volume_slider_title"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="center_vertical"
        android:paddingStart="@dimen/hearing_devices_small_title_padding_horizontal"
        android:textAppearance="@style/TextAppearance.Dialog.Title"
        android:textDirection="locale"
        android:textSize="14sp"
        style="@style/HearingDeviceDialog.Title"
        android:textAppearance="@style/TextAppearance.HearingDeviceDialog.Title"
        android:textColor="@androidprv:color/materialColorOnSurface"
        android:labelFor="@+id/ambient_volume_slider"
        android:gravity="center_vertical" />
        android:visibility="gone"/>
    <com.google.android.material.slider.Slider
        style="@style/SystemUI.Material3.Slider"
        android:id="@+id/ambient_volume_slider"
+38 −0
Original line number Diff line number Diff line
<!--
    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="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginTop="@dimen/hearing_devices_layout_margin"
    android:orientation="vertical">

    <TextView
        android:id="@+id/preset_title"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        style="@style/HearingDeviceDialog.Title"
        android:textAppearance="@style/TextAppearance.HearingDeviceDialog.Title"
        android:text="@string/hearing_devices_preset_label"/>
    <Spinner
        android:id="@+id/preset_spinner"
        android:layout_width="match_parent"
        android:layout_height="@dimen/hearing_devices_preset_spinner_height"
        android:layout_marginTop="4dp"
        style="@style/HearingDeviceDialog.Spinner" />

</LinearLayout>
Loading