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

Commit 6e2d5a85 authored by Jiaming Cheng's avatar Jiaming Cheng
Browse files

[QSDetailedView] Revamp the Bluetooth details view UI

Implemented the `Pair new device` button.

Bug: b/378514021
Flag: com.android.systemui.qs_tile_detailed_view
Test: Style change only. Existing unit tests still pass.
Change-Id: I0c1dd7a8ca581ef5bf8ef202e3a7423e956204e5
parent e8532f98
Loading
Loading
Loading
Loading
+37 −17
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/root"
    style="@style/Widget.SliceView.Panel"
    android:paddingBottom="@dimen/tile_details_bottom_padding"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content">

@@ -180,6 +181,7 @@
                android:background="@drawable/bluetooth_tile_dialog_bg_off"
                android:layout_width="0dp"
                android:layout_height="64dp"
                android:layout_marginBottom="@dimen/tile_details_bottom_padding"
                android:contentDescription="@string/accessibility_bluetooth_device_settings_see_all"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
@@ -197,29 +199,47 @@
                android:ellipsize="end"
                android:visibility="gone" />

            <Button
            <LinearLayout
                android:id="@+id/pair_new_device_button"
                style="@style/BluetoothTileDialog.Device"
                android:paddingEnd="0dp"
                android:paddingStart="26dp"
                android:background="@drawable/bluetooth_tile_dialog_bg_off"
                android:layout_height="@dimen/tile_details_button_row_height"
                android:layout_width="0dp"
                android:layout_height="64dp"
                android:contentDescription="@string/accessibility_bluetooth_device_settings_pair_new_device"
                app:layout_constrainedWidth="true"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/see_all_button"
                android:drawableStart="@drawable/ic_add"
                android:drawablePadding="26dp"
                android:drawableTint="?android:attr/textColorPrimary"
                app:layout_constraintBottom_toBottomOf="parent"
                android:background="@drawable/settingslib_entry_bg_off"
                android:gravity="center"
                android:visibility="gone">

                <FrameLayout
                    android:layout_width="@dimen/tile_details_button_size"
                    android:layout_height="@dimen/tile_details_button_size"
                    android:clickable="false">

                    <ImageView
                        android:contentDescription="@string/accessibility_bluetooth_device_settings_pair_new_device"
                        android:src="@drawable/ic_add"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:tint="?android:attr/textColorPrimary" />
                </FrameLayout>

                <FrameLayout
                    android:clickable="false"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="@dimen/tile_details_entry_start_margin">

                    <TextView
                        android:text="@string/pair_new_bluetooth_devices"
                android:textSize="14sp"
                android:textAppearance="@style/TextAppearance.BluetoothTileDialog"
                android:textDirection="locale"
                android:textAlignment="viewStart"
                android:maxLines="1"
                android:ellipsize="end"
                android:visibility="gone" />
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:textAppearance="@style/TextAppearance.TileDetailsEntryTitle" />
                </FrameLayout>
            </LinearLayout>


            <androidx.constraintlayout.widget.Barrier
                android:id="@+id/barrier"
+1 −0
Original line number Diff line number Diff line
@@ -2276,6 +2276,7 @@
    <dimen name="tile_details_bottom_padding">14dp</dimen>
    <dimen name="tile_details_horizontal_padding">14dp</dimen>
    <dimen name="tile_details_vertical_padding">8dp</dimen>
    <dimen name="tile_details_entry_start_margin">16dp</dimen>
    <!-- Tile Details end -->

</resources>