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

Commit cf6674d7 authored by Adnan Begovic's avatar Adnan Begovic
Browse files

SystemUi: Reintroduce custom qs tiles management.

Change-Id: I88dbf3911d4783de7c3f231aa57c51ce43bc8ae6
parent 95cce6e3
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -21,6 +21,8 @@

    <uses-permission android:name="cyanogenmod.permission.WRITE_SETTINGS" />
    <uses-permission android:name="cyanogenmod.permission.WRITE_SECURE_SETTINGS" />
    <!-- Quick Settings Tile Listener -->
    <uses-permission android:name="cyanogenmod.permission.BIND_CUSTOM_TILE_LISTENER_SERVICE"/>

    <!-- Development shortcut -->
    <uses-permission android:name="android.permission.CLEAR_APP_USER_DATA" />
+57 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2015 The CyanogenMod 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="match_parent"
              android:orientation="vertical"
              android:paddingBottom="8dp">

    <LinearLayout android:layout_height="wrap_content"
                  android:layout_width="match_parent"
                  android:orientation="horizontal">

        <ImageView android:id="@+id/custom_qs_tile_icon"
                   android:layout_width="36dp"
                   android:layout_height="36dp"
                   android:layout_marginEnd="12dp"  />

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

            <TextView android:id="@+id/custom_qs_tile_title"
                      android:layout_height="wrap_content"
                      android:layout_width="wrap_content"
                      android:textAppearance="@style/TextAppearance.QS.DetailItemPrimary"/>

            <TextView android:id="@+id/custom_qs_tile_package "
                      android:layout_height="wrap_content"
                      android:layout_width="wrap_content"
                      android:layout_marginTop="2dp"
                      android:textAppearance="@style/TextAppearance.QS.DetailItemSub"/>

            <TextView android:id="@+id/custom_qs_tile_content_description"
                      android:layout_height="wrap_content"
                      android:layout_width="wrap_content"
                      android:layout_marginTop="2dp"
                      android:textAppearance="@style/TextAppearance.QS.DetailItemSub" />

        </LinearLayout>

    </LinearLayout>

</LinearLayout>
+10 −0
Original line number Diff line number Diff line
@@ -43,6 +43,16 @@
                android:textAppearance="@style/TextAppearance.QS.DetailButton"
                android:focusable="true" />

        <TextView
                android:id="@android:id/button3"
                style="@style/QSBorderlessButton"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginEnd="8dp"
                android:minWidth="88dp"
                android:textAppearance="@style/TextAppearance.QS.DetailButton"
                android:focusable="true" />

        <TextView
                android:id="@android:id/button1"
                style="@style/QSBorderlessButton"
+3 −0
Original line number Diff line number Diff line
@@ -85,4 +85,7 @@

    <!-- Screen pinning dialog description (for devices without navbar) -->
    <string name="screen_pinning_description_no_navbar">This keeps it in view until you unpin. Touch and hold the Back button to unpin.</string>

    <string name="quick_settings_custom_tile_detail_title">Custom Tile</string>
    <string name="quick_settings_remove">Remove tile</string>
</resources>
+4 −0
Original line number Diff line number Diff line
@@ -37,4 +37,8 @@
        <item name="android:textColor">@color/status_bar_temperature_location_text_color</item>
    </style>

    <style name="TextAppearance.QS.DetailItemSub">
        <item name="android:textSize">@dimen/qs_detail_item_secondary_text_size</item>
    </style>

</resources>
Loading