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

Commit bd6dbb06 authored by Jason Monk's avatar Jason Monk
Browse files

QS: Add long-press to customize prototype - part 1

Start adding prototype to long-press to go to customization view
for QS.  Currently it allows re-arranging and resetting.  Later
it will have more.

Change-Id: Ib2ba0f93ac2f4cced4f146d39771a8a17ac05bc2
parent c6c28731
Loading
Loading
Loading
Loading
+25 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2015 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:layout_marginTop="10dp"
    android:layout_marginBottom="10dp"
    android:layout_marginStart="40dp"
    android:layout_marginEnd="40dp"
    android:background="#4dffffff" />
+39 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2015 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.customize.NonPagedTileLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/tiles_container"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical">

    <com.android.systemui.qs.QuickTileLayout
        android:id="@+id/quick_tile_layout"
        android:layout_width="match_parent"
        android:layout_height="@dimen/qs_quick_actions_height"
        android:orientation="horizontal"
        android:paddingStart="@dimen/qs_quick_actions_padding"
        android:paddingEnd="@dimen/qs_quick_actions_padding" />

    <view
        class="com.android.systemui.qs.PagedTileLayout$TilePage"
        android:id="@+id/tile_page"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />

</com.android.systemui.qs.customize.NonPagedTileLayout>
+47 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2015 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.customize.QSCustomizer
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:background="?android:attr/windowBackground">

    <Toolbar
        android:id="@*android:id/action_bar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:navigationContentDescription="@*android:string/action_bar_up_description"
        android:background="?android:attr/colorPrimary"
        style="?android:attr/toolbarStyle" />

    <com.android.systemui.tuner.AutoScrollView
        android:layout_width="match_parent"
        android:layout_height="fill_parent"
        android:paddingTop="8dp"
        android:paddingBottom="8dp"
        android:elevation="2dp">

        <com.android.systemui.qs.customize.CustomQSPanel
            android:id="@+id/quick_settings_panel"
            android:background="#0000"
            android:layout_width="match_parent"
            android:layout_height="wrap_content" />

    </com.android.systemui.tuner.AutoScrollView>

</com.android.systemui.qs.customize.QSCustomizer>
+3 −0
Original line number Diff line number Diff line
@@ -1156,4 +1156,7 @@
         settings are -->
    <string name="experimental">Experimental</string>

    <string name="save" translatable="false">Save</string>
    <string name="qs_customize" translatable="false">Allow long-press customize in Quick Settings</string>

</resources>
+4 −0
Original line number Diff line number Diff line
@@ -37,6 +37,10 @@
                android:key="qs_paged_panel"
                android:title="@string/qs_paging" />

            <com.android.systemui.tuner.TunerSwitch
                android:key="qs_allow_customize"
                android:title="@string/qs_customize" />

        </PreferenceCategory>

    </PreferenceScreen>
Loading