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

Commit 713b7273 authored by Fabian Kozynski's avatar Fabian Kozynski
Browse files

Add Structure pages to management screens

Pages are sorted alphabetically and show all controls for that
structure. The name used is the structure name of the app name for the
empty/null structure.

Done button saves all favorites selected from all structures, not just
the visible one.

Test: manual
Fixes: 150707923

Change-Id: I8ae822ed5acb6340aa08acb0dc6f3a4e6bb2f2e4
parent 3ce07026
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -46,6 +46,7 @@ android_library {
        "SystemUIPluginLib",
        "SystemUISharedLib",
        "SettingsLib",
        "androidx.viewpager2_viewpager2",
        "androidx.legacy_legacy-support-v4",
        "androidx.recyclerview_recyclerview",
        "androidx.preference_preference",
@@ -106,6 +107,7 @@ android_library {
        "SystemUIPluginLib",
        "SystemUISharedLib",
        "SettingsLib",
        "androidx.viewpager2_viewpager2",
        "androidx.legacy_legacy-support-v4",
        "androidx.recyclerview_recyclerview",
        "androidx.preference_preference",
+35 −16
Original line number Diff line number Diff line
@@ -25,6 +25,30 @@
    android:paddingStart="@dimen/controls_management_side_padding"
    android:paddingEnd="@dimen/controls_management_side_padding" >

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

        <FrameLayout
            android:id="@+id/icon_frame"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:gravity="start|center_vertical"
            android:minWidth="56dp"
            android:visibility="gone"
            android:paddingTop="@dimen/controls_app_icon_frame_top_padding"
            android:paddingBottom="@dimen/controls_app_icon_frame_bottom_padding"
            android:paddingEnd="@dimen/controls_app_icon_frame_side_padding"
            android:paddingStart="@dimen/controls_app_icon_frame_side_padding" >

            <ImageView
                android:id="@android:id/icon"
                android:layout_width="@dimen/controls_app_icon_size"
                android:layout_height="@dimen/controls_app_icon_size" />
        </FrameLayout>

        <TextView
            android:id="@+id/title"
            android:layout_width="wrap_content"
@@ -33,6 +57,9 @@
            android:textSize="@dimen/controls_title_size"
            android:textAlignment="center" />

    </LinearLayout>


    <TextView
        android:id="@+id/subtitle"
        android:layout_width="wrap_content"
@@ -41,19 +68,11 @@
        android:textAppearance="?android:attr/textAppearanceSmall"
        android:textAlignment="center" />

    <androidx.core.widget.NestedScrollView
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:orientation="vertical"
        android:layout_marginTop="@dimen/controls_management_list_margin">

    <ViewStub
        android:id="@+id/stub"
        android:layout_width="match_parent"
            android:layout_height="match_parent"/>

    </androidx.core.widget.NestedScrollView>
        android:layout_height="0dp"
        android:layout_weight="1"/>

    <FrameLayout
        android:layout_width="match_parent"
+12 −6
Original line number Diff line number Diff line
@@ -14,12 +14,18 @@
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->
<androidx.core.widget.NestedScrollView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="0dp"
    android:layout_weight="1"
    android:orientation="vertical"
    android:layout_marginTop="@dimen/controls_management_list_margin">

    <androidx.recyclerview.widget.RecyclerView
    xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/list"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
    >
    />

</androidx.recyclerview.widget.RecyclerView>
 No newline at end of file
</androidx.core.widget.NestedScrollView>
+11 −5
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_height="0dp"
    android:orientation="vertical">

    <TextView
@@ -29,11 +29,17 @@
        android:gravity="center_horizontal"
    />

    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/listAll"
        android:layout_width="match_parent"
    <com.android.systemui.controls.management.ManagementPageIndicator
        android:id="@+id/structure_page_indicator"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_gravity="center"
        android:layout_marginTop="@dimen/controls_management_list_margin"
        android:nestedScrollingEnabled="false"/>
        android:visibility="gone" />

    <androidx.viewpager2.widget.ViewPager2
        android:id="@+id/structure_pager"
        android:layout_width="match_parent"
        android:layout_height="match_parent"/>

</LinearLayout>
 No newline at end of file
+31 −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.
  -->

<androidx.core.widget.NestedScrollView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:layout_marginTop="@dimen/controls_management_list_margin">

    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/listAll"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
    />

</androidx.core.widget.NestedScrollView>
 No newline at end of file
Loading