Home | History | Annotate | Download | only in layout
      1 <?xml version="1.0" encoding="utf-8"?>
      2 <!-- Copyright (C) 2017 The Android Open Source Project
      3 
      4      Licensed under the Apache License, Version 2.0 (the "License");
      5      you may not use this file except in compliance with the License.
      6      You may obtain a copy of the License at
      7 
      8           http://www.apache.org/licenses/LICENSE-2.0
      9 
     10      Unless required by applicable law or agreed to in writing, software
     11      distributed under the License is distributed on an "AS IS" BASIS,
     12      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13      See the License for the specific language governing permissions and
     14      limitations under the License.
     15 -->
     16 
     17 <!-- Based off packages/apps/settings/res/layout/preference_material_settings.xml
     18      except that this has a thinner icon layout. -->
     19 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     20     android:layout_width="match_parent"
     21     android:layout_height="wrap_content"
     22     android:addStatesFromChildren="true"
     23     android:background="?android:attr/colorAccent"
     24     android:gravity="center_vertical"
     25     android:minHeight="?android:attr/listPreferredItemHeightSmall"
     26     android:paddingStart="?android:attr/listPreferredItemPaddingStart" >
     27 
     28     <LinearLayout
     29         android:layout_width="wrap_content"
     30         android:layout_height="wrap_content"
     31         android:gravity="center_vertical"
     32         android:minHeight="72dp"
     33         android:orientation="horizontal"
     34         android:paddingTop="16dp"
     35         android:paddingBottom="16dp" >
     36 
     37         <LinearLayout
     38             android:id="@+id/icon_frame"
     39             android:layout_width="wrap_content"
     40             android:layout_height="wrap_content"
     41             android:gravity="start|center_vertical"
     42             android:orientation="horizontal">
     43             <com.android.internal.widget.PreferenceImageView
     44                 android:id="@android:id/icon"
     45                 android:layout_width="wrap_content"
     46                 android:layout_height="wrap_content"
     47                 android:maxWidth="24dp"
     48                 android:maxHeight="24dp" />
     49         </LinearLayout>
     50 
     51         <TextView android:id="@android:id/title"
     52             android:layout_width="wrap_content"
     53             android:layout_height="wrap_content"
     54             android:ellipsize="marquee"
     55             android:paddingStart="24dp"
     56             android:singleLine="true"
     57             android:textAppearance="?android:attr/textAppearanceListItem"
     58             android:textColor="?android:attr/textColorPrimaryInverse" />
     59     </LinearLayout>
     60 
     61 </LinearLayout>
     62