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

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

Merge "Implement new footer" into sc-dev

parents 6acca065 353f2a31
Loading
Loading
Loading
Loading
+37 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2021 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.
  -->
<inset xmlns:android="http://schemas.android.com/apk/res/android"
    android:insetTop="@dimen/qs_footer_action_inset"
    android:insetBottom="@dimen/qs_footer_action_inset">
    <ripple
        android:color="?android:attr/colorControlHighlight"
        android:height="44dp">
        <item android:id="@android:id/mask">
            <shape android:shape="rectangle">
                <solid android:color="@android:color/white"/>
                <corners android:radius="@dimen/screenshot_button_corner_radius"/>
            </shape>
        </item>
        <item>
            <shape android:shape="rectangle">
            <stroke android:width="1dp" android:color="@color/qs_footer_action_border"/>
                <solid android:color="@android:color/transparent"/>
                <corners android:radius="@dimen/screenshot_button_corner_radius"/>
            </shape>
        </item>
    </ripple>
</inset>
 No newline at end of file
+35 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2021 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.
  -->
<inset xmlns:android="http://schemas.android.com/apk/res/android"
    android:insetTop="@dimen/qs_footer_action_inset"
    android:insetBottom="@dimen/qs_footer_action_inset">
    <ripple
        android:color="?android:attr/colorControlHighlight">
        <item android:id="@android:id/mask">
            <shape android:shape="rectangle">
                <solid android:color="@android:color/white"/>
                <corners android:radius="@dimen/screenshot_button_corner_radius"/>
            </shape>
        </item>
        <item>
            <shape android:shape="rectangle">
                <solid android:color="@android:color/transparent"/>
                <corners android:radius="@dimen/screenshot_button_corner_radius"/>
            </shape>
        </item>
    </ripple>
</inset>
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
@@ -89,7 +89,7 @@
                android:background="?android:attr/selectableItemBackgroundBorderless"
                android:clickable="true"
                android:clipToPadding="false"
                android:contentDescription="@string/accessibility_quick_settings_edit"
                android:contentDescription="@string/accessibility_quick_settings_power_menu"
                android:focusable="true"
                android:padding="@dimen/qs_footer_icon_padding"
                android:src="@*android:drawable/ic_lock_power_off"
+159 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
** Copyright 2021, 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 FrameLayout -->
<com.android.systemui.qs.QSFooterView xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/qs_footer"
    android:layout_width="match_parent"
    android:layout_height="@dimen/qs_footer_height"
    android:layout_marginStart="@dimen/qs_footer_margin"
    android:layout_marginEnd="@dimen/qs_footer_margin"
    android:background="@android:color/transparent"
    android:baselineAligned="false"
    android:clickable="false"
    android:clipChildren="false"
    android:clipToPadding="false">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="48dp"
            android:layout_gravity="center_vertical">

            <TextView
                android:id="@+id/build"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:paddingStart="@dimen/qs_tile_margin_horizontal"
                android:paddingEnd="4dp"
                android:layout_weight="1"
                android:clickable="true"
                android:ellipsize="marquee"
                android:focusable="true"
                android:gravity="center_vertical"
                android:singleLine="true"
                android:textAppearance="@style/TextAppearance.QS.Status"
                android:visibility="gone" />

            <com.android.systemui.qs.PageIndicator
                android:id="@+id/footer_page_indicator"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:layout_gravity="center_vertical"
                android:visibility="gone" />

            <View
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1" />

        </LinearLayout>

        <LinearLayout
            android:id="@+id/qs_footer_actions_container"
            android:layout_width="match_parent"
            android:layout_height="48dp"
            android:gravity="center_vertical">

            <com.android.systemui.statusbar.AlphaOptimizedImageView
                android:id="@android:id/edit"
                android:layout_width="0dp"
                android:layout_height="@dimen/qs_footer_action_button_size"
                android:layout_marginEnd="@dimen/qs_tile_margin_horizontal"
                android:layout_weight="1"
                android:background="@drawable/qs_footer_action_chip_background"
                android:clickable="true"
                android:clipToPadding="false"
                android:contentDescription="@string/accessibility_quick_settings_edit"
                android:focusable="true"
                android:padding="@dimen/qs_footer_icon_padding"
                android:src="@*android:drawable/ic_mode_edit"
                android:tint="?android:attr/colorForeground" />

            <com.android.systemui.statusbar.phone.MultiUserSwitch
                android:id="@+id/multi_user_switch"
                android:layout_width="0dp"
                android:layout_height="@dimen/qs_footer_action_button_size"
                android:layout_marginEnd="@dimen/qs_tile_margin_horizontal"
                android:layout_weight="1"
                android:background="@drawable/qs_footer_action_chip_background"
                android:focusable="true">

                <ImageView
                    android:id="@+id/multi_user_avatar"
                    android:layout_width="@dimen/multi_user_avatar_expanded_size"
                    android:layout_height="@dimen/multi_user_avatar_expanded_size"
                    android:layout_gravity="center"
                    android:scaleType="centerInside" />
            </com.android.systemui.statusbar.phone.MultiUserSwitch>

            <com.android.systemui.statusbar.AlphaOptimizedFrameLayout
                android:id="@+id/settings_button_container"
                android:layout_width="0dp"
                android:layout_height="@dimen/qs_footer_action_button_size"
                android:layout_marginEnd="@dimen/qs_tile_margin_horizontal"
                android:background="@drawable/qs_footer_action_chip_background"
                android:layout_weight="1"
                android:clipChildren="false"
                android:clipToPadding="false">

                <com.android.systemui.statusbar.phone.SettingsButton
                    android:id="@+id/settings_button"
                    android:layout_width="match_parent"
                    android:layout_height="@dimen/qs_footer_action_button_size"
                    android:layout_gravity="center"
                    android:contentDescription="@string/accessibility_quick_settings_settings"
                    android:background="@drawable/qs_footer_action_chip_background_borderless"
                    android:padding="@dimen/qs_footer_icon_padding"
                    android:scaleType="centerInside"
                    android:src="@drawable/ic_settings"
                    android:tint="?android:attr/colorForeground" />

                <com.android.systemui.statusbar.AlphaOptimizedImageView
                    android:id="@+id/tuner_icon"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:paddingStart="36dp"
                    android:paddingEnd="4dp"
                    android:src="@drawable/tuner"
                    android:tint="?android:attr/textColorTertiary"
                    android:visibility="invisible" />

            </com.android.systemui.statusbar.AlphaOptimizedFrameLayout>

            <com.android.systemui.statusbar.AlphaOptimizedImageView
                android:id="@+id/pm_lite"
                android:layout_width="0dp"
                android:layout_height="@dimen/qs_footer_action_button_size"
                android:layout_weight="1"
                android:background="@drawable/qs_footer_action_chip_background"
                android:clickable="true"
                android:clipToPadding="false"
                android:focusable="true"
                android:padding="@dimen/qs_footer_icon_padding"
                android:src="@*android:drawable/ic_lock_power_off"
                android:contentDescription="@string/accessibility_quick_settings_power_menu"
                android:tint="?android:attr/colorForeground" />

        </LinearLayout>
    </LinearLayout>

</com.android.systemui.qs.QSFooterView>
+4 −1
Original line number Diff line number Diff line
@@ -42,7 +42,10 @@
            android:background="@android:color/transparent"
            android:focusable="true"
            android:accessibilityTraversalBefore="@android:id/edit">
            <include layout="@layout/qs_footer_impl" />
            <ViewStub
                android:id="@+id/qs_footer_stub"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"/>
            <include layout="@layout/qs_media_divider"
                android:id="@+id/divider"/>
        </com.android.systemui.qs.QSPanel>
Loading