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

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

Merge changes from topic 'two_target_preference'

* changes:
  Update string character limit
  Convert BT preference to use TwoTargetPreference
  Refactor the layout for MasterSwitch to a 2 target pref
parents 07328d39 5ae37599
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -1014,6 +1014,8 @@
            </intent-filter>
            </intent-filter>
            <meta-data android:name="com.android.settings.category"
            <meta-data android:name="com.android.settings.category"
                android:value="com.android.settings.category.ia.development" />
                android:value="com.android.settings.category.ia.development" />
            <meta-data android:name="com.android.settings.summary"
                android:resource="@string/summary_empty" />
            <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
            <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
                android:value="com.android.settings.applications.ProcessStatsSummary" />
                android:value="com.android.settings.applications.ProcessStatsSummary" />
        </activity>
        </activity>
+0 −90
Original line number Original line Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2017 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 preference_material_settings.xml except that ripple on only on the left side. -->
<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:background="@android:color/transparent"
    android:clipToPadding="false">

    <LinearLayout
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_weight="1"
        android:background="?android:attr/selectableItemBackground"
        android:gravity="start|center_vertical"
        android:paddingStart="?android:attr/listPreferredItemPaddingStart">

        <LinearLayout
            android:id="@+id/icon_container"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:minWidth="60dp"
            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:singleLine="true"
                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:maxLines="10"/>

        </RelativeLayout>

    </LinearLayout>

    <!-- Preference should place its actual preference widget here. -->
    <LinearLayout
        android:id="@android:id/widget_frame"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:gravity="end|center_vertical"
        android:orientation="vertical"
        android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"/>

</LinearLayout>
+2 −2
Original line number Original line Diff line number Diff line
@@ -35,7 +35,6 @@
            android:id="@android:id/icon"
            android:id="@android:id/icon"
            android:layout_width="wrap_content"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_height="wrap_content"
            android:tint="?android:attr/textColorPrimary"
            android:maxWidth="18dp"
            android:maxWidth="18dp"
            android:maxHeight="18dp"/>
            android:maxHeight="18dp"/>
    </LinearLayout>
    </LinearLayout>
@@ -47,7 +46,8 @@
        android:layout_height="wrap_content"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:layout_weight="1"
        android:layout_gravity="start|center"
        android:layout_gravity="start|center"
        android:textAppearance="@android:style/TextAppearance.Material.Body2"/>
        android:textAppearance="@android:style/TextAppearance.Material.Body2"
        android:textColor="?android:attr/colorAccent"/>


    <ProgressBar
    <ProgressBar
        android:id="@+id/scanning_progress"
        android:id="@+id/scanning_progress"
+30 −0
Original line number Original line Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2006 The Android Open Source Project
<!-- Copyright (C) 2011 The Android Open Source Project


     Licensed under the Apache License, Version 2.0 (the "License");
     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     you may not use this file except in compliance with the License.
@@ -14,20 +14,17 @@
     limitations under the License.
     limitations under the License.
-->
-->


<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
<!-- Settings button -->
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:gravity="center_vertical">

    <!-- Details button -->
<ImageView
<ImageView
        android:id="@+id/deviceDetails"
    xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="wrap_content"
    android:id="@+id/settings_button"
        android:layout_height="wrap_content"
    android:layout_width="match_parent"
        android:layout_gravity="center_vertical"
    android:layout_height="match_parent"
        android:padding="8dip"
    android:layout_gravity="center"
    android:paddingStart="?android:attr/listPreferredItemPaddingEnd"
    android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
    android:background="?android:attr/selectableItemBackground"
    android:background="?android:attr/selectableItemBackground"
    android:scaleType="center"
    android:src="@drawable/ic_settings"
    android:src="@drawable/ic_settings"
        android:contentDescription="@string/bluetooth_device_details" />
    android:contentDescription="@string/settings_button" />
</LinearLayout>
+9 −25
Original line number Original line Diff line number Diff line
@@ -15,28 +15,12 @@
  limitations under the License.
  limitations under the License.
  -->
  -->


<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<Switch
  android:layout_width="wrap_content"
    xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_height="match_parent">
    android:id="@+id/switchWidget"

    android:layout_width="match_parent"
    <LinearLayout
      android:layout_width="wrap_content"
      android:layout_height="match_parent"
      android:gravity="start|center_vertical"
      android:orientation="horizontal"
      android:paddingEnd="20dp"
      android:paddingTop="16dp"
      android:paddingBottom="16dp">
        <View
          android:layout_width="1dp"
          android:layout_height="match_parent"
          android:background="?android:attr/dividerVertical"/>
    </LinearLayout>

    <Switch android:id="@+id/switchWidget"
      android:layout_width="wrap_content"
    android:layout_height="match_parent"
    android:layout_height="match_parent"
    android:gravity="center_vertical"
    android:gravity="center_vertical"
    android:paddingStart="?android:attr/listPreferredItemPaddingEnd"
    android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
    android:clickable="false" />
    android:clickable="false" />

</LinearLayout>
Loading