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

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

Merge "Use SettingsLib's LayoutPreference"

parents 397e2d77 dce94bb2
Loading
Loading
Loading
Loading
+0 −18
Original line number Diff line number Diff line
<!--
     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.
-->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content" />
+0 −105
Original line number 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.
  -->

<!-- Entity header -->
<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/entity_header"
    style="@style/EntityHeader"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="horizontal">

    <LinearLayout
        android:id="@+id/entity_header_content"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:gravity="center_horizontal"
        android:orientation="vertical">

        <ImageView
            android:id="@+id/entity_header_icon"
            android:layout_width="48dp"
            android:layout_height="48dp"
            android:scaleType="fitXY"
            android:antialias="true"/>

        <TextView
            android:id="@+id/entity_header_title"
            style="@style/TextAppearance.EntityHeaderTitle"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:singleLine="false"
            android:ellipsize="marquee"
            android:textDirection="locale"
            android:layout_marginTop="8dp"/>

        <TextView
            android:id="@+id/install_type"
            style="@style/TextAppearance.EntityHeaderSummary"
            android:visibility="gone"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="2dp"/>

        <TextView
            android:id="@+id/entity_header_summary"
            style="@style/TextAppearance.EntityHeaderSummary"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="2dp"/>

        <TextView
            android:id="@+id/entity_header_second_summary"
            style="@style/TextAppearance.EntityHeaderSummary"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />

    </LinearLayout>

    <LinearLayout
        android:id="@+id/entity_header_links"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_centerVertical="true"
        android:layout_alignParentEnd="true"
        android:orientation="vertical">

        <ImageButton
            android:id="@android:id/button1"
            style="?android:attr/actionOverflowButtonStyle"
            android:layout_width="wrap_content"
            android:layout_weight="1"
            android:layout_height="0dp"
            android:minWidth="@dimen/min_tap_target_size"
            android:src="@null"
            android:tint="?android:attr/colorAccent" />

        <ImageButton
            android:id="@android:id/button2"
            style="?android:attr/actionOverflowButtonStyle"
            android:layout_width="wrap_content"
            android:layout_weight="1"
            android:layout_height="0dp"
            android:minWidth="@dimen/min_tap_target_size"
            android:src="@null"
            android:tint="?android:attr/colorAccent" />

    </LinearLayout>

</RelativeLayout>
+0 −24
Original line number Diff line number Diff line
@@ -331,23 +331,6 @@
        <item name="android:textColor">?android:attr/textColorSecondary</item>
    </style>

    <style name="TextAppearance.EntityHeaderTitle"
           parent="@android:style/TextAppearance.Material.Subhead">
        <item name="android:fontFamily">@*android:string/config_headlineFontFamilyMedium</item>
        <item name="android:textColor">?android:attr/textColorPrimary</item>
        <item name="android:textSize">20sp</item>
    </style>

    <style name="TextAppearance.EntityHeaderSummary"
           parent="@android:style/TextAppearance.Material.Body1">
        <item name="android:textAlignment">viewStart</item>
        <item name="android:textColor">?android:attr/textColorSecondary</item>
        <item name="android:gravity">start</item>
        <item name="android:singleLine">true</item>
        <item name="android:ellipsize">marquee</item>
        <item name="android:textSize">14sp</item>
    </style>

    <style name="TextAppearance.ZenOnboardingButton">
        <item name="android:fontFamily">sans-serif-medium</item>
        <item name="android:textSize">14sp</item>
@@ -418,13 +401,6 @@
        <item name="android:progressDrawable">@drawable/ring_progress</item>
    </style>

    <style name="EntityHeader">
        <item name="android:background">?android:attr/colorPrimaryDark</item>
        <item name="android:paddingTop">24dp</item>
        <item name="android:paddingBottom">16dp</item>
        <item name="android:paddingEnd">16dp</item>
    </style>

    <style name="ActionPrimaryButton" parent="android:Widget.DeviceDefault.Button.Colored"/>

    <style name="ActionSecondaryButton" parent="android:Widget.DeviceDefault.Button"/>
+2 −2
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@
        android:title="@string/account_settings_title"
        settings:keywords="@string/keywords_accounts">

    <com.android.settings.applications.LayoutPreference
    <com.android.settingslib.widget.LayoutPreference
        android:key="account_header"
        android:layout="@layout/settings_entity_header"
        android:selectable="false"
@@ -35,7 +35,7 @@
        android:icon="@drawable/ic_sync"
        android:order="200"/>

    <com.android.settings.applications.LayoutPreference
    <com.android.settingslib.widget.LayoutPreference
      android:key="remove_account"
      android:layout="@layout/remove_account_button"
      android:order="1000"
+2 −2
Original line number Diff line number Diff line
@@ -21,14 +21,14 @@
    android:key="installed_app_detail_settings_screen"
    settings:initialExpandedChildrenCount="6">

    <com.android.settings.applications.LayoutPreference
    <com.android.settingslib.widget.LayoutPreference
        android:key="header_view"
        android:layout="@layout/settings_entity_header"
        android:selectable="false"
        android:order="-10000"
        settings:allowDividerBelow="true"/>

    <com.android.settings.applications.LayoutPreference
    <com.android.settingslib.widget.LayoutPreference
        android:key="instant_app_buttons"
        android:layout="@layout/instant_app_buttons"
        android:selectable="false"
Loading