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

Commit 2a1cab11 authored by Selim Cinek's avatar Selim Cinek
Browse files

Changed the landscape experience of quick settings

When introducing Media into quick settings, the landscape
experience never really worked well. The music player
would be cut off on the bottom and users could never
reach their playback controls.
Instead of the vertical layout, we're now rendering
quick settings side by side with the player.

Using some densities, this could still be too large,
so we're also introducing a scrollview for the
expanded quick settings.
This also makes sure all the paddings and spacings
are up to spec.

This also fixes behavior where a user could still collapse
the panel while the user switcher was showing.

Bug: 154332040
Test: atest SystemUITests
Change-Id: I3b8babc2cc6a91e19824b67f043aa5044dc370b9
parent 516b6dfc
Loading
Loading
Loading
Loading
+6 −9
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@ public interface QS extends FragmentBase {

    String ACTION = "com.android.systemui.action.PLUGIN_QS";

    int VERSION = 7;
    int VERSION = 8;

    String TAG = "QS";

@@ -67,15 +67,12 @@ public interface QS extends FragmentBase {
    }

    /**
     * We need this to handle nested scrolling for QS..
     * Normally we would do this with requestDisallowInterceptTouchEvent, but when both the
     * scroll containers are using the same touch slop, they try to start scrolling at the
     * same time and NotificationPanelView wins, this lets QS win.
     *
     * TODO: Do this using NestedScroll capabilities.
     * Should touches from the notification panel be disallowed?
     * The notification panel might grab any touches rom QS at any time to collapse the shade.
     * We should disallow that in case we are showing the detail panel.
     */
    default boolean onInterceptTouchEvent(MotionEvent event) {
        return isCustomizing();
    default boolean disallowPanelTouches() {
        return isShowingDetail();
    }

    @ProvidesInterface(version = HeightListener.VERSION)
+3 −2
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@
    android:background="@drawable/qs_detail_background"
    android:clickable="true"
    android:orientation="vertical"
    android:layout_marginTop="@*android:dimen/quick_qs_offset_height"
    android:paddingBottom="8dp"
    android:visibility="invisible"
    android:elevation="4dp"
@@ -44,7 +45,7 @@
        android:scaleType="fitXY"
        />

    <com.android.systemui.qs.NonInterceptingScrollView
    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
@@ -54,7 +55,7 @@
            android:id="@android:id/content"
            android:layout_width="match_parent"
            android:layout_height="match_parent"/>
    </com.android.systemui.qs.NonInterceptingScrollView>
    </ScrollView>

    <include layout="@layout/qs_detail_buttons" />

+0 −20
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.
-->
<View xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="1dp"
    android:alpha=".12"
    android:background="?android:attr/colorForeground" />
+3 −0
Original line number Diff line number Diff line
@@ -61,7 +61,10 @@
                android:clickable="true"
                android:gravity="center_vertical"
                android:focusable="true"
                android:singleLine="true"
                android:ellipsize="end"
                android:textAppearance="@style/TextAppearance.QS.Status"
                android:layout_marginEnd="4dp"
                android:visibility="gone"/>
         </com.android.keyguard.AlphaOptimizedLinearLayout>

+0 −2
Original line number Diff line number Diff line
@@ -20,7 +20,5 @@
    android:id="@+id/tile_page"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingStart="@dimen/notification_side_paddings"
    android:paddingEnd="@dimen/notification_side_paddings"
    android:clipChildren="false"
    android:clipToPadding="false" />
Loading