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

Commit 6894e82d authored by Zoey Chen's avatar Zoey Chen Committed by Automerger Merge Worker
Browse files

Merge "[LeAudio] New Broadcast dialog UI" into tm-dev am: fdfa0593

parents f6a116d1 fdfa0593
Loading
Loading
Loading
Loading
+23 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2022 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"
       xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
       android:shape="rectangle">
    <solid android:color="?androidprv:attr/colorAccentPrimary" />
    <corners android:radius="@dimen/broadcast_dialog_btn_radius" />
</shape>
+84 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2022 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.
-->

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
             android:layout_width="match_parent"
             android:layout_height="match_parent">

    <LinearLayout
        android:id="@+id/dialog_bg"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginBottom="@dimen/broadcast_dialog_margin"
            android:orientation="vertical">

            <ImageView
                android:id="@+id/dialog_icon"
                android:layout_width="@dimen/broadcast_dialog_icon_size"
                android:layout_height="@dimen/broadcast_dialog_icon_size"
                android:layout_marginTop="@dimen/broadcast_dialog_icon_margin_top"
                android:layout_marginBottom="@dimen/broadcast_dialog_title_img_margin_top"
                android:layout_gravity="center"
                android:src="@drawable/settings_input_antenna"/>

            <TextView
                style="@style/BroadcastDialogTitleStyle"
                android:id="@+id/dialog_title"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:gravity="center"
                android:layout_gravity="center"/>

            <TextView
                style="@style/BroadcastDialogBodyStyle"
                android:id="@+id/dialog_subtitle"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:gravity="center"
                android:layout_gravity="center"/>
        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginHorizontal="@dimen/broadcast_dialog_margin"
            android:layout_marginBottom="@dimen/broadcast_dialog_margin"
            android:orientation="vertical">

            <Button
                android:layout_marginBottom="@dimen/broadcast_dialog_btn_margin_bottom"
                android:id="@+id/positive_btn"
                style="@style/BroadcastDialogButtonStyle"/>

            <Button
                android:layout_marginBottom="@dimen/broadcast_dialog_btn_margin_bottom"
                android:id="@+id/negative_btn"
                android:text="@string/bt_le_audio_broadcast_dialog_different_output"
                style="@style/BroadcastDialogButtonStyle"/>

            <Button
                android:id="@+id/neutral_btn"
                android:text="@android:string/cancel"
                style="@style/BroadcastDialogButtonStyle"/>
        </LinearLayout>

    </LinearLayout>
</FrameLayout>
+1 −0
Original line number Diff line number Diff line
@@ -92,6 +92,7 @@
            android:layout_marginStart="?attr/sudMarginStart"
            android:layout_marginEnd="?attr/sudMarginEnd"
            android:gravity="center"
            android:layout_gravity="center"
            android:visibility="invisible"/>

    </LinearLayout>
+14 −0
Original line number Diff line number Diff line
@@ -120,4 +120,18 @@
    <dimen name="qrcode_preview_margin">40dp</dimen>
    <dimen name="qrcode_preview_radius">30dp</dimen>
    <dimen name="qrcode_icon_size">27dp</dimen>

    <!-- Broadcast dialog -->
    <dimen name="broadcast_dialog_title_img_margin_top">18dp</dimen>
    <dimen name="broadcast_dialog_title_text_size">24sp</dimen>
    <dimen name="broadcast_dialog_title_text_margin">16dp</dimen>
    <dimen name="broadcast_dialog_title_text_margin_top">18dp</dimen>
    <dimen name="broadcast_dialog_subtitle_text_size">14sp</dimen>
    <dimen name="broadcast_dialog_icon_size">24dp</dimen>
    <dimen name="broadcast_dialog_icon_margin_top">25dp</dimen>
    <dimen name="broadcast_dialog_btn_radius">100dp</dimen>
    <dimen name="broadcast_dialog_btn_margin_bottom">4dp</dimen>
    <dimen name="broadcast_dialog_btn_text_size">16sp</dimen>
    <dimen name="broadcast_dialog_btn_minHeight">44dp</dimen>
    <dimen name="broadcast_dialog_margin">16dp</dimen>
</resources>
+45 −0
Original line number Diff line number Diff line
@@ -39,4 +39,49 @@
        <item name="android:textColor">?android:attr/textColorPrimary</item>
        <item name="android:textDirection">locale</item>
    </style>

    <style name="BroadcastDialogTitleStyle">
        <item name="android:textAppearance">@style/TextAppearanceBroadcastDialogTitle</item>
        <item name="android:layout_marginStart">@dimen/broadcast_dialog_title_text_margin</item>
        <item name="android:layout_marginEnd">@dimen/broadcast_dialog_title_text_margin</item>
        <item name="android:layout_marginTop">@dimen/broadcast_dialog_title_text_margin_top</item>
        <item name="android:layout_marginBottom">18dp</item>
    </style>

    <style name="TextAppearanceBroadcastDialogTitle" parent="@android:TextAppearance.DeviceDefault.Headline">
        <item name="android:textSize">@dimen/broadcast_dialog_title_text_size</item>
        <item name="android:textColor">?android:attr/textColorPrimary</item>
        <item name="android:textDirection">locale</item>
        <item name="android:ellipsize">end</item>
    </style>

    <style name="BroadcastDialogBodyStyle">
        <item name="android:textAppearance">@style/TextAppearanceBroadcastDialogSubTitle</item>
        <item name="android:layout_margin">@dimen/broadcast_dialog_title_text_margin</item>
    </style>

    <style name="TextAppearanceBroadcastDialogSubTitle" parent="@android:TextAppearance.DeviceDefault.Headline">
        <item name="android:textSize">@dimen/broadcast_dialog_subtitle_text_size</item>
        <item name="android:textColor">?android:attr/textColorSecondary</item>
        <item name="android:textDirection">locale</item>
        <item name="android:ellipsize">end</item>
    </style>

    <style name="BroadcastDialogButtonStyle">
        <item name="android:textAppearance">@style/TextAppearanceBroadcastDialogButton</item>
        <item name="android:layout_width">match_parent</item>
        <item name="android:layout_height">wrap_content</item>
        <item name="android:layout_gravity">center</item>
        <item name="android:gravity">center</item>
        <item name="android:stateListAnimator">@null</item>
        <item name="android:elevation">0dp</item>
        <item name="android:minHeight">@dimen/broadcast_dialog_btn_minHeight</item>
        <item name="android:background">@drawable/broadcast_dialog_btn_bg</item>
    </style>

    <style name="TextAppearanceBroadcastDialogButton" parent="@android:TextAppearance.DeviceDefault.Headline">
        <item name="android:textColor">?android:attr/textColorPrimary</item>
        <item name="android:textSize">@dimen/broadcast_dialog_btn_text_size</item>
    </style>

</resources>
Loading