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

Commit 1d95426f authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "New small volume dialog"

parents 428a59ab ee57193b
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -181,6 +181,5 @@ public interface VolumeDialogController {
        void onScreenOff();
        void onShowSafetyWarning(int flags);
        void onAccessibilityModeChanged(Boolean showA11yStream);
        void onConnectedDeviceChanged(String deviceName);
    }
}
+11 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
       android:shape="rectangle">
    <solid android:color="@*android:color/material_grey_200" />
    <corners
        android:bottomLeftRadius="@dimen/corner_size"
        android:topLeftRadius="0dp"
        android:bottomRightRadius="@dimen/corner_size"
        android:topRightRadius="0dp"
        />
</shape>
+0 −70
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2017 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.
-->
<!-- extends LinearLayout -->
<com.android.systemui.HardwareUiLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_marginBottom="0dp"
    android:clipToPadding="false"
    android:theme="@style/qs_theme"
    android:clipChildren="false">
    <com.android.systemui.volume.OutputChooserLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:sysui="http://schemas.android.com/apk/res-auto"
        android:id="@+id/output_chooser"
        android:layout_width="@dimen/output_chooser_panel_width"
        android:layout_height="@dimen/output_chooser_panel_width"
        android:layout_gravity="center_vertical|end"
        android:orientation="vertical"
        android:translationZ="8dp"
        android:padding="20dp" >

        <TextView
            android:id="@+id/title"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textDirection="locale"
            android:textAppearance="@style/TextAppearance.QS.DetailHeader"
            android:layout_marginBottom="20dp" />

        <com.android.systemui.qs.AutoSizingList
            android:id="@android:id/list"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical"
            sysui:itemHeight="@dimen/qs_detail_item_height"
            style="@style/AutoSizingList"/>

        <LinearLayout
            android:id="@android:id/empty"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_gravity="center"
            android:gravity="center"
            android:orientation="vertical">

            <TextView
                android:id="@+id/empty_text"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textDirection="locale"
                android:layout_marginTop="20dp"
                android:textAppearance="@style/TextAppearance.QS.DetailEmpty"/>
        </LinearLayout>
    </com.android.systemui.volume.OutputChooserLayout>
</com.android.systemui.HardwareUiLayout>
+0 −72
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2017 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:minHeight="@dimen/qs_detail_item_height"
              android:background="@drawable/btn_borderless_rect"
              android:clickable="true"
              android:focusable="true"
              android:gravity="center_vertical"
              android:orientation="horizontal" >

    <ImageView
        android:id="@android:id/icon"
        android:layout_width="@dimen/qs_detail_item_icon_width"
        android:layout_height="@dimen/qs_detail_item_icon_size"
        android:layout_marginStart="@dimen/qs_detail_item_icon_marginStart"
        android:layout_marginEnd="@dimen/qs_detail_item_icon_marginEnd"
        android:background="?android:selectableItemBackgroundBorderless"
        android:tint="?android:attr/textColorPrimary"/>

    <LinearLayout
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="12dp"
        android:layout_weight="1"
        android:orientation="vertical" >

        <TextView
            android:id="@android:id/title"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:textDirection="locale"
            android:ellipsize="end"
            android:textAppearance="@style/TextAppearance.QS.DetailItemPrimary" />

        <TextView
            android:id="@android:id/summary"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:textDirection="locale"
            android:layout_marginTop="2dp"
            android:textAppearance="@style/TextAppearance.QS.DetailItemSecondary" />
    </LinearLayout>

    <ImageView
        android:id="@android:id/icon2"
        style="@style/QSBorderlessButton"
        android:layout_width="48dp"
        android:layout_height="48dp"
        android:layout_marginStart="30dp"
        android:clickable="true"
        android:focusable="true"
        android:scaleType="center"
        android:contentDescription="@*android:string/media_route_controller_disconnect"
        android:tint="?android:attr/textColorPrimary" />

</LinearLayout>
+45 −54
Original line number Diff line number Diff line
@@ -23,79 +23,70 @@
    <!-- right-aligned to be physically near volume button -->
    <LinearLayout
        android:id="@+id/volume_dialog"
        android:minWidth="@dimen/volume_dialog_panel_width"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center_vertical|right"
        android:minWidth="@dimen/volume_dialog_panel_width"
        android:background="@android:color/transparent"
        android:layout_margin="@dimen/volume_dialog_base_margin"
        android:orientation="vertical"
        android:clipChildren="false" >

        <FrameLayout
            android:id="@+id/ringer"
            android:layout_width="@dimen/volume_dialog_ringer_size"
            android:layout_height="@dimen/volume_dialog_ringer_size"
            android:layout_marginBottom="@dimen/volume_dialog_spacer"
            android:elevation="@dimen/volume_panel_elevation"
            android:layout_gravity="right"
            android:background="@drawable/rounded_bg_full">
            <com.android.keyguard.AlphaOptimizedImageButton
                android:id="@+id/ringer_icon"
                style="@style/VolumeButtons"
                android:background="?android:selectableItemBackgroundBorderless"
                android:layout_width="@dimen/volume_dialog_tap_target_size"
                android:layout_height="@dimen/volume_dialog_tap_target_size"
                android:tint="@color/accent_tint_color_selector"
                android:layout_gravity="center"
                android:soundEffectsEnabled="false" />

            <include layout="@layout/volume_dnd_icon"/>
        </FrameLayout>

        <LinearLayout
            android:id="@+id/volume_dialog_rows"
            android:id="@+id/main"
            android:layout_width="wrap_content"
            android:minWidth="@dimen/volume_dialog_panel_width"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:clipChildren="false"
            android:clipToPadding="false"
            android:background="@drawable/rounded_bg_full"
            android:translationZ="@dimen/volume_panel_elevation"
            android:elevation="@dimen/volume_panel_elevation" >
            <LinearLayout
                android:id="@+id/volume_dialog_rows"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:minWidth="@dimen/volume_dialog_panel_width"
                android:gravity="center"
                android:orientation="horizontal" >
                    <!-- volume rows added and removed here! :-) -->
            </LinearLayout>

            <FrameLayout
            android:id="@+id/footer"
            android:layout_width="@dimen/volume_dialog_panel_width"
            android:layout_height="@dimen/volume_dialog_panel_width"
            android:layout_marginTop="6dp"
            android:layout_marginBottom="6dp"
            android:layout_below="@id/volume_dialog_rows"
            android:background="@drawable/rounded_bg_full">

            <LinearLayout
                android:id="@+id/footer_linear_layout"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:clipChildren="false"
                android:clipToPadding="false"
                android:gravity="center"
                android:layout_gravity="end"
                android:translationZ="@dimen/volume_panel_elevation"
                android:clickable="true"
                android:orientation="vertical" >

                <TextView
                    android:id="@+id/ringer_title"
                    android:text="@string/ring_toggle_title"
                    android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                    android:ellipsize="end"
                    android:maxLines="1"
                    android:layout_centerVertical="true"
                    android:textColor="?android:attr/colorControlNormal"
                    android:textAppearance="@style/TextAppearance.Volume.Header" />

                android:layout_width="match_parent"
                android:background="@drawable/rounded_bg_bottom_background">
                <com.android.keyguard.AlphaOptimizedImageButton
                    android:id="@+id/ringer_icon"
                    style="@style/VolumeButtons"
                    android:id="@+id/settings"
                    android:src="@drawable/ic_settings"
                    android:layout_width="@dimen/volume_dialog_tap_target_size"
                    android:layout_height="@dimen/volume_dialog_tap_target_size"
                    android:layout_gravity="center"
                    android:background="?android:selectableItemBackgroundBorderless"
                    android:layout_width="@dimen/volume_dialog_panel_width"
                    android:layout_height="@dimen/volume_button_size"
                    android:tint="@color/accent_tint_color_selector"
                    android:tint="#8A000000"
                    android:soundEffectsEnabled="false" />

                <TextView
                    android:id="@+id/ringer_status"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:ellipsize="end"
                    android:maxLines="1"
                    android:textColor="?android:attr/colorControlNormal"
                    android:textAppearance="@style/TextAppearance.Volume.Header.Secondary" />
            </FrameLayout>
        </LinearLayout>

            <include layout="@layout/volume_dnd_icon"/>
        </FrameLayout>
    </LinearLayout>
</com.android.systemui.volume.VolumeUiLayout>
 No newline at end of file
Loading