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

Commit 1c3a4de9 authored by Fan Zhang's avatar Fan Zhang
Browse files

Switch to use small icon for most app related pages

- Renamed AppProgressPreference to AppPreference to handle most app
  related prefs
- Add ed AppSwitchPreference - the same layout as AppPreference except
  it's a SwitchPreference
- Use above 2 prefs in most app related pages.
  - Everything under special access pages
  - Recent app list in App & notifications
  - App data usage detail page
  - Default app picker pages

Bug: 65182905
Test: robotests
Change-Id: I96c980ba1db49e36dabe25b5eade1197215aad11
parent 974d2fe0
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -29,13 +29,17 @@
    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:gravity="center"
        android:orientation="horizontal">
        android:gravity="start|center_vertical"
        android:minWidth="60dp"
        android:orientation="horizontal"
        android:paddingEnd="12dp"
        android:paddingTop="4dp"
        android:paddingBottom="4dp">

        <ImageView
            android:id="@+id/icon"
            android:layout_width="@android:dimen/app_icon_size"
            android:layout_height="@android:dimen/app_icon_size"
            android:layout_width="@dimen/secondary_app_icon_size"
            android:layout_height="@dimen/secondary_app_icon_size"
            android:layout_gravity="center_vertical"
            android:layout_marginEnd="8dip"
            android:contentDescription="@null" />
@@ -70,7 +74,7 @@

    </RelativeLayout>

    <CheckBox
    <Switch
        android:id="@+id/checkbox"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
+23 −10
Original line number Diff line number Diff line
@@ -38,13 +38,14 @@
            android:id="@android:id/icon"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            settings:maxWidth="24dp"
            settings:maxHeight="24dp" />
            settings:maxWidth="@dimen/secondary_app_icon_size"
            settings:maxHeight="@dimen/secondary_app_icon_size" />
    </LinearLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:orientation="vertical"
        android:paddingTop="16dp"
        android:paddingBottom="16dp">
@@ -60,15 +61,14 @@
        <LinearLayout
            android:id="@+id/summary_container"
            android:layout_width="match_parent"
            android:layout_height="wrap_content">
            android:layout_height="wrap_content"
            android:visibility="gone">
            <TextView android:id="@android:id/summary"
                      android:layout_width="0dp"
                      android:layout_height="wrap_content"
                      android:layout_weight="1"
                      android:textAppearance="@style/TextAppearance.Small"
                      android:textColor="?android:attr/textColorSecondary"
                      android:maxLines="1"
                      android:ellipsize="end" />
                      android:textColor="?android:attr/textColorSecondary" />

            <TextView android:id="@+id/appendix"
                      android:layout_width="wrap_content"
@@ -78,9 +78,22 @@
                      android:maxLines="1"
                      android:ellipsize="end" />
        </LinearLayout>
        <FrameLayout
            android:id="@android:id/widget_frame"
        <ProgressBar
            android:id="@android:id/progress"
            style="?android:attr/progressBarStyleHorizontal"
            android:layout_width="match_parent"
            android:layout_height="wrap_content" />
            android:layout_height="wrap_content"
            android:layout_marginTop="4dp"
            android:max="100"
            android:visibility="gone" />
    </LinearLayout>

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

</LinearLayout>
+0 −23
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.
-->

<ProgressBar xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@android:id/progress"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginTop="4dp"
    android:max="100"
    style="?android:attr/progressBarStyleHorizontal" />
+1 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@
    <dimen name="action_bar_switch_padding">16dip</dimen>

    <dimen name="app_icon_size">40dip</dimen>
    <dimen name="secondary_app_icon_size">24dp</dimen>
    <dimen name="min_tap_target_size">48dp</dimen>
    <dimen name="screen_margin_sides">64dip</dimen>
    <dimen name="screen_margin_top">72dip</dimen>
+14 −14
Original line number Diff line number Diff line
@@ -21,56 +21,56 @@
    android:key="app_default_settings_screen"
    android:title="@string/app_default_dashboard_title">

    <Preference
    <com.android.settings.widget.AppPreference
        android:key="assist_and_voice_input"
        android:title="@string/assist_and_voice_input_title"
        android:fragment="com.android.settings.applications.assist.ManageAssist" />

    <Preference
    <com.android.settings.widget.AppPreference
        android:key="default_browser"
        android:title="@string/default_browser_title"
        android:fragment="com.android.settings.applications.defaultapps.DefaultBrowserPicker">
        <extra android:name="for_work" android:value="false" />
    </Preference>
    </com.android.settings.widget.AppPreference>

    <Preference
    <com.android.settings.widget.AppPreference
        android:key="default_home"
        android:title="@string/home_app"
        android:fragment="com.android.settings.applications.defaultapps.DefaultHomePicker"
        settings:keywords="@string/keywords_home" />

    <Preference
    <com.android.settings.widget.AppPreference
        android:key="default_phone_app"
        android:title="@string/default_phone_title"
        android:fragment="com.android.settings.applications.defaultapps.DefaultPhonePicker"
        settings:keywords="@string/keywords_default_phone_app" />

    <Preference
    <com.android.settings.widget.AppPreference
        android:key="default_sms_app"
        android:title="@string/sms_application_title"
        android:fragment="com.android.settings.applications.defaultapps.DefaultSmsPicker"
        settings:keywords="@string/keywords_more_default_sms_app" />

    <Preference
    <com.android.settings.widget.AppPreference
        android:key="default_payment_app"
        android:title="@string/nfc_payment_settings_title"
        android:summary="@string/summary_placeholder"
        android:fragment="com.android.settings.nfc.PaymentSettings" />

    <Preference
    <com.android.settings.widget.AppPreference
        android:key="default_emergency_app"
        android:title="@string/default_emergency_app"
        settings:keywords="@string/keywords_emergency_app" />

    <!--
    <Preference
    <com.android.settings.widget.AppPreference
        android:key="default_notification_asst_app"
        android:title="@string/default_notification_assistant"
        android:fragment="com.android.settings.applications.defaultapps.DefaultNotificationAssistantPicker"
        />
     -->

    <Preference
    <com.android.settings.widget.AppPreference
        android:key="domain_urls"
        android:title="@string/domain_urls_title"
        android:fragment="com.android.settings.applications.ManageDomainUrls" />
@@ -79,20 +79,20 @@
        android:key="work_app_defaults"
        android:title="@string/default_for_work">

        <Preference
        <com.android.settings.widget.AppPreference
            android:key="work_default_browser"
            android:title="@string/default_browser_title"
            android:fragment="com.android.settings.applications.defaultapps.DefaultBrowserPicker">
            <extra android:name="for_work" android:value="true" />
        </Preference>
        </com.android.settings.widget.AppPreference>

        <Preference
        <com.android.settings.widget.AppPreference
            android:key="work_default_phone_app"
            android:title="@string/default_phone_title"
            android:fragment="com.android.settings.applications.defaultapps.DefaultPhonePicker"
            settings:keywords="@string/keywords_default_phone_app">
            <extra android:name="for_work" android:value="true" />
        </Preference>
        </com.android.settings.widget.AppPreference>

    </com.android.settings.widget.WorkOnlyCategory>

Loading