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

Commit 5fc5f6ba authored by Fabian Kozynski's avatar Fabian Kozynski
Browse files

Polish controls management activities

* Change to no toolbar and add title and subtitle
* Change individual controls to use lozenges (same layouts as in the
controls space).

Test: manual
Bug: 148207527
Change-Id: Ie0f3c53ca12dbe29aa1e4469fc0146e29f548d76
parent 144034cf
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -644,7 +644,7 @@

        <activity android:name=".controls.management.ControlsProviderSelectorActivity"
                  android:label="Controls Providers"
                  android:theme="@style/Theme.SystemUI"
                  android:theme="@style/Theme.ControlsManagement"
                  android:exported="true"
                  android:showForAllUsers="true"
                  android:excludeFromRecents="true"
@@ -654,7 +654,7 @@

        <activity android:name=".controls.management.ControlsFavoritingActivity"
                  android:parentActivityName=".controls.management.ControlsProviderSelectorActivity"
                  android:theme="@style/Theme.SystemUI"
                  android:theme="@style/Theme.ControlsManagement"
                  android:excludeFromRecents="true"
                  android:showForAllUsers="true"
                  android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation|keyboard|keyboardHidden"
+34 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="center_horizontal"
    android:paddingTop="@dimen/controls_management_top_padding"
    android:paddingStart="@dimen/controls_management_side_padding"
    android:paddingEnd="@dimen/controls_management_side_padding" >

    <TextView
        android:id="@+id/title"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textAppearance="?android:attr/textAppearanceLarge"
        android:textSize="@dimen/controls_title_size"
        android:textAlignment="center" />

    <TextView
        android:id="@+id/subtitle"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="@dimen/controls_management_titles_margin"
        android:textAppearance="?android:attr/textAppearanceSmall"
        android:textAlignment="center" />

    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/list"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="@dimen/controls_management_list_margin" />

</LinearLayout>
 No newline at end of file
+0 −70
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright (C) 2019 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.
-->
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="?android:attr/selectableItemBackground"
    android:gravity="center_vertical"
    android:minHeight="?android:attr/listPreferredItemHeightSmall"
    android:paddingStart="?android:attr/listPreferredItemPaddingStart"
    android:paddingEnd="?android:attr/listPreferredItemPaddingEnd">

    <LinearLayout
        android:id="@+id/icon_frame"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:gravity="start|center_vertical"
        android:minWidth="56dp"
        android:orientation="horizontal"
        android:paddingEnd="8dp"
        android:paddingTop="4dp"
        android:paddingBottom="4dp">
        <ImageView
            android:id="@android:id/icon"
            android:layout_width="@dimen/app_icon_size"
            android:layout_height="@dimen/app_icon_size"/>
    </LinearLayout>

    <LinearLayout
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:orientation="vertical"
        android:paddingTop="16dp"
        android:paddingBottom="16dp">

        <TextView
            android:id="@android:id/title"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:ellipsize="marquee"
            android:fadingEdge="horizontal"
            android:singleLine="true"
            android:textAppearance="?android:attr/textAppearanceListItem"/>

    </LinearLayout>

    <LinearLayout
        android:id="@android:id/widget_frame"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:gravity="center_vertical|end"
        android:minWidth="64dp"
        android:orientation="vertical"/>

</LinearLayout>
 No newline at end of file
+0 −72
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.constraintlayout.widget.ConstraintLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="100dp"
    android:padding="15dp"
    android:clickable="true"
    android:focusable="true">

    <ImageView
        android:id="@+id/icon"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <TextView
        android:id="@+id/status"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textSize="12sp"
        android:textColor="?android:attr/textColorPrimary"
        android:fontFamily="@*android:string/config_bodyFontFamily"
        android:paddingLeft="3dp"
        app:layout_constraintBottom_toBottomOf="@+id/icon"
        app:layout_constraintStart_toEndOf="@+id/icon" />

    <TextView
        android:id="@+id/title"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textSize="18sp"
        android:textColor="?android:attr/textColorPrimary"
        android:fontFamily="@*android:string/config_headlineFontFamily"
        app:layout_constraintBottom_toTopOf="@+id/subtitle"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/icon" />

    <TextView
        android:id="@+id/subtitle"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textSize="16sp"
        android:textColor="?android:attr/textColorSecondary"
        android:fontFamily="@*android:string/config_headlineFontFamily"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintStart_toStartOf="parent" />

    <CheckBox
        android:id="@+id/favorite"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintBottom_toBottomOf="parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>
+87 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?><!--
  Copyright (C) 2019 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.
-->
<FrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="?android:attr/selectableItemBackground">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="start|top"
        android:gravity="center_vertical"
        android:minHeight="?android:attr/listPreferredItemHeightSmall"
        android:paddingStart="?android:attr/listPreferredItemPaddingStart"
        android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
        android:layout_marginBottom="@dimen/controls_app_bottom_margin">

        <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:orientation="horizontal"
            android:paddingTop="@dimen/controls_app_icon_frame_top_padding"
            android:paddingBottom="@dimen/controls_app_icon_frame_top_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>

        <LinearLayout
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:orientation="vertical"
            android:paddingTop="@dimen/controls_app_text_padding"
            android:paddingBottom="@dimen/controls_app_text_padding">

            <TextView
                android:id="@android:id/title"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:ellipsize="end"
                android:fadingEdge="horizontal"
                android:singleLine="true"
                android:textAppearance="?android:attr/textAppearanceMedium"
                android:textColor="?android:attr/textColorPrimary"/>

            <TextView
                android:id="@+id/favorites"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:ellipsize="end"
                android:fadingEdge="horizontal"
                android:singleLine="true"
                android:textAppearance="?android:attr/textAppearanceSmall" />

        </LinearLayout>

    </LinearLayout>
    <View
        android:layout_width="match_parent"
        android:layout_height="@dimen/controls_app_divider_height"
        android:layout_gravity="center_horizontal|bottom"
        android:layout_marginStart="@dimen/controls_app_divider_side_margin"
        android:layout_marginEnd="@dimen/controls_app_divider_side_margin"
        android:background="?android:attr/listDivider" />
</FrameLayout>
 No newline at end of file
Loading