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

Commit d629142a authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Change to use the expand button in support lib."

parents 315d2740 8b14a1a7
Loading
Loading
Loading
Loading

res/layout/expand_preference.xml

deleted100644 → 0
+0 −75
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright (C) 2016 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.
  -->

<!-- Based off frameworks/base/core/res/res/layout/preference_material.xml -->
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:minHeight="?android:attr/listPreferredItemHeight"
    android:gravity="center_vertical"
    android:paddingStart="?android:attr/listPreferredItemPaddingStart"
    android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
    android:background="?android:attr/selectableItemBackground"
    android:clipToPadding="false">

    <LinearLayout
        android:id="@+id/icon_frame"
        style="@style/preference_icon_frame"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:gravity="start|center_vertical"
        android:orientation="horizontal"
        android:paddingEnd="12dp"
        android:paddingTop="4dp"
        android:paddingBottom="4dp">
        <com.android.internal.widget.PreferenceImageView
            android:id="@android:id/icon"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:maxWidth="48dp"
            android:maxHeight="48dp"/>
    </LinearLayout>

    <RelativeLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:paddingTop="16dp"
        android:paddingBottom="16dp">

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

        <TextView
            android:id="@android:id/summary"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@android:id/title"
            android:layout_alignStart="@android:id/title"
            android:textAppearance="?android:attr/textAppearanceListItemSecondary"
            android:textColor="?android:attr/textColorSecondary"
            android:ellipsize="marquee"
            android:maxLines="1"/>

    </RelativeLayout>

</LinearLayout>
+2 −1
Original line number Diff line number Diff line
@@ -19,7 +19,8 @@
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
    android:key="apps_and_notification_screen"
    android:title="@string/app_and_notification_dashboard_title">
    android:title="@string/app_and_notification_dashboard_title"
    settings:initialExpandedChildrenCount="4">

    <PreferenceCategory
        android:key="recent_apps_category"
+0 −83
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright (C) 2016 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.
  -->

<PreferenceScreen
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
    android:title="@string/app_and_notification_dashboard_title"
    android:key="apps_and_notification_screen"
    settings:initialExpandedChildrenCount="4">

    <PreferenceCategory
        android:key="recent_apps_category"
        android:title="@string/recent_app_category_title"
        android:order="-200">
        <!-- Placeholder for a list of recent apps -->

        <!-- See all apps button -->
        <Preference
            android:title="@string/applications_settings"
            android:key="all_app_info"
            android:order="20">
            <intent
                android:action="android.intent.action.MAIN"
                android:targetPackage="com.android.settings"
                android:targetClass="com.android.settings.Settings$ManageApplicationsActivity">
                <extra android:name="show_drawer_menu" android:value="true" />
            </intent>
        </Preference>
    </PreferenceCategory>

    <!-- Empty category to draw divider -->
    <PreferenceCategory
        android:key="all_app_info_divider"
        android:order="-190"/>

    <Preference
        android:key="manage_perms"
        android:title="@string/app_permissions"
        android:order="-130"
        settings:keywords="@string/keywords_app_permissions">
        <intent android:action="android.intent.action.MANAGE_PERMISSIONS" />
    </Preference>

    <PreferenceCategory
        android:key="dashboard_tile_placeholder"
        android:order="10" />

    <com.android.settingslib.RestrictedPreference
        android:key="app_and_notif_cell_broadcast_settings"
        android:title="@string/cell_broadcast_settings"
        android:order="15"
        settings:useAdminDisabledSummary="true">
        <intent
            android:action="android.intent.action.MAIN"
            android:targetPackage="com.android.cellbroadcastreceiver"
            android:targetClass="com.android.cellbroadcastreceiver.CellBroadcastSettings" />
    </com.android.settingslib.RestrictedPreference>

    <Preference
        android:key="special_access"
        android:title="@string/special_access"
        android:order="20" >
        <intent
            android:action="android.intent.action.MAIN"
            android:targetPackage="com.android.settings"
            android:targetClass="com.android.settings.Settings$SpecialAccessSettingsActivity" />
    </Preference>

</PreferenceScreen>
 No newline at end of file
+2 −1
Original line number Diff line number Diff line
@@ -19,7 +19,8 @@
    xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
    android:key="display_settings_screen"
    android:title="@string/display_settings"
    settings:keywords="@string/keywords_display">
    settings:keywords="@string/keywords_display"
    settings:initialExpandedChildrenCount="4">

    <Preference
        android:key="brightness"
+0 −128
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2016 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.
-->

<PreferenceScreen
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
    android:title="@string/display_settings"
    settings:keywords="@string/keywords_display"
    android:key="display_settings_screen"
    settings:initialExpandedChildrenCount="4">

    <Preference
        android:key="brightness"
        android:title="@string/brightness"
        settings:keywords="@string/keywords_display_brightness_level">
        <intent android:action="com.android.intent.action.SHOW_BRIGHTNESS_DIALOG" />
    </Preference>

    <com.android.settings.display.NightDisplayPreference
        android:key="night_display"
        android:title="@string/night_display_title"
        android:fragment="com.android.settings.display.NightDisplaySettings"
        android:widgetLayout="@null"
        settings:widgetLayout="@null"
        settings:keywords="@string/keywords_display_night_display" />

    <!-- Cross-listed item, if you change this, also change it in power_usage_summary.xml -->
    <SwitchPreference
        android:key="auto_brightness"
        android:title="@string/auto_brightness_title"
        settings:keywords="@string/keywords_display_auto_brightness"
        android:summary="@string/auto_brightness_summary" />

    <com.android.settingslib.RestrictedPreference
        android:key="wallpaper"
        android:title="@string/wallpaper_settings_title"
        settings:keywords="@string/keywords_display_wallpaper"
        settings:useAdminDisabledSummary="true">
        <intent
            android:targetPackage="@string/config_wallpaper_picker_package"
            android:targetClass="@string/config_wallpaper_picker_class" />
    </com.android.settingslib.RestrictedPreference>

    <!-- Cross-listed item, if you change this, also change it in power_usage_summary.xml -->
    <com.android.settings.TimeoutListPreference
        android:key="screen_timeout"
        android:title="@string/screen_timeout"
        android:summary="@string/summary_placeholder"
        android:entries="@array/screen_timeout_entries"
        android:entryValues="@array/screen_timeout_values" />

    <SwitchPreference
        android:key="auto_rotate"
        android:title="@string/accelerometer_title" />

    <SwitchPreference
        android:key="color_mode"
        android:title="@string/color_mode_title" />

    <Preference
        android:key="font_size"
        android:title="@string/title_font_size"
        android:fragment="com.android.settings.accessibility.ToggleFontSizePreferenceFragment"
        settings:keywords="@string/keywords_display_font_size" />

    <com.android.settings.display.ScreenZoomPreference
        android:key="screen_zoom"
        android:title="@string/screen_zoom_title"
        settings:keywords="@string/screen_zoom_keywords" />

    <Preference
        android:key="screensaver"
        android:title="@string/screensaver_settings_title"
        android:fragment="com.android.settings.dream.DreamSettings" />

    <!-- Cross-listed item, if you change this, also change it in power_usage_summary.xml -->
    <Preference
        android:key="ambient_display"
        android:title="@string/ambient_display_screen_title"
        android:fragment="com.android.settings.display.AmbientDisplaySettings" />

    <!-- Hide night mode for now
    <ListPreference
        android:key="night_mode"
        android:title="@string/night_mode_title"
        settings:keywords="@string/keywords_display_night_mode"
        android:summary="@string/night_mode_summary"
        android:entries="@array/night_mode_entries"
        android:entryValues="@array/night_mode_values" /> -->

    <SwitchPreference
        android:key="camera_gesture"
        android:title="@string/camera_gesture_title"
        android:summary="@string/camera_gesture_desc" />

    <SwitchPreference
        android:key="lift_to_wake"
        android:title="@string/lift_to_wake_title" />

    <SwitchPreference
        android:key="tap_to_wake"
        android:title="@string/tap_to_wake"
        android:summary="@string/tap_to_wake_summary" />

    <ListPreference
        android:key="theme"
        android:title="@string/device_theme"
        android:summary="@string/summary_placeholder" />

    <Preference
        android:key="vr_display_pref"
        android:title="@string/display_vr_pref_title"
        android:fragment="com.android.settings.display.VrDisplayPreferencePicker" />

</PreferenceScreen>
Loading