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

Commit 703f295c authored by Fabian Kozynski's avatar Fabian Kozynski
Browse files

Prototype tiles with side labels

This switches the tiles in QS to have the labels on the side, and
display in two columns.

Implemented:
* animation in expansion interleaves the tiles from QQS into QS, so the
first half of QQS moves to the left column
* Tapping on the label has the same effect as long pressing

Not implemented:
* animated shape between QQS and QS
* Edit screen

Landscape with media has a bug where scrolling pages resets to first
page. Also, animations in landscape with media don't look great.

To enable:
adb shell settings put secure sysui_side_labels 1
(0 to disable)

and restart SystemUI

Test: manual
Test: SystemUITests

Change-Id: I7468bc2c0b81e99a2de235a3b4312e678e968fd2
parent 246e9240
Loading
Loading
Loading
Loading
+23 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2020 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.
-->
<com.android.systemui.qs.SideLabelTileLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/tile_page"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:clipChildren="false"
    android:clipToPadding="false" />
+27 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2020 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.
-->

<com.android.systemui.qs.PagedTileLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:systemui="http://schemas.android.com/apk/res-auto"
    android:id="@+id/qs_pager"
    android:layout_width="match_parent"
    android:layout_height="0dp"
    android:layout_weight="1"
    android:clipChildren="true"
    android:paddingBottom="@dimen/qs_paged_tile_layout_padding_bottom"
    systemui:sideLabels="true" />
+2 −1
Original line number Diff line number Diff line
@@ -34,7 +34,8 @@
        <Space
            android:id="@+id/expand_space"
            android:layout_width="22dp"
            android:layout_height="0dp" />
            android:layout_height="0dp"
            android:visibility="gone" />

        <TextView
            android:id="@+id/tile_label"
+27 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2020 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="1px"
      android:layout_height="match_parent"
      android:layout_gravity="center_vertical"
      android:layout_marginBottom="10dp"
      android:layout_marginTop="10dp"
      android:layout_marginStart="0dp"
      android:layout_marginEnd="0dp"
      android:background="?android:attr/textColorSecondary"
/>
 No newline at end of file
+4 −0
Original line number Diff line number Diff line
@@ -167,5 +167,9 @@
        <attr name="android:drawable" />
        <attr name="android:alpha" />
    </declare-styleable>

    <declare-styleable name="PagedTileLayout">
        <attr name="sideLabels" format="boolean"/>
    </declare-styleable>
</resources>
Loading