Pankaj Garg | 32e1b94 | 2015-06-03 18:13:24 -0700 | [diff] [blame] | 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <!-- |
| 3 | Copyright (c) 2015, The Linux Foundation. All rights reserved. |
| 4 | |
| 5 | Redistribution and use in source and binary forms, with or without |
| 6 | modification, are permitted provided that the following conditions are |
| 7 | met: |
| 8 | * Redistributions of source code must retain the above copyright |
| 9 | notice, this list of conditions and the following disclaimer. |
| 10 | * Redistributions in binary form must reproduce the above |
| 11 | copyright notice, this list of conditions and the following |
| 12 | disclaimer in the documentation and/or other materials provided |
| 13 | with the distribution. |
| 14 | * Neither the name of The Linux Foundation nor the names of its |
| 15 | contributors may be used to endorse or promote products derived |
| 16 | from this software without specific prior written permission. |
| 17 | |
| 18 | THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED |
| 19 | WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
| 20 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT |
| 21 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS |
| 22 | BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 23 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 24 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR |
| 25 | BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
| 26 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE |
| 27 | OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN |
| 28 | IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 | --> |
| 30 | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| 31 | android:layout_width="match_parent" |
| 32 | android:layout_height="wrap_content" |
| 33 | android:paddingEnd="?android:attr/scrollbarSize" |
| 34 | android:minHeight="?android:attr/listPreferredItemHeightSmall" |
| 35 | android:gravity="center_vertical" > |
| 36 | <!--android:background="?android:attr/selectableItemBackgroundBorderless"--> |
| 37 | |
| 38 | <!--Padding--> |
| 39 | <TextView |
| 40 | android:layout_width="wrap_content" |
| 41 | android:layout_height="wrap_content" |
| 42 | android:layout_marginStart="20dip" /> |
| 43 | |
| 44 | <!--Icon for preference--> |
| 45 | <ImageView |
| 46 | android:id="@+android:id/icon" |
| 47 | android:layout_width="wrap_content" |
| 48 | android:layout_height="wrap_content" |
| 49 | android:layout_gravity="center" /> |
| 50 | |
| 51 | <!--Preference title and summary--> |
| 52 | <RelativeLayout |
| 53 | android:layout_width="wrap_content" |
| 54 | android:layout_height="wrap_content" |
| 55 | android:layout_marginStart="10dip" |
| 56 | android:layout_marginEnd="6dip" |
| 57 | android:layout_marginTop="6dip" |
| 58 | android:layout_marginBottom="6dip" |
| 59 | android:layout_weight="1"> |
| 60 | |
| 61 | <TextView android:id="@+android:id/title" |
| 62 | android:layout_width="wrap_content" |
| 63 | android:layout_height="wrap_content" |
| 64 | android:singleLine="true" |
| 65 | android:textAppearance="?android:attr/textAppearanceListItemSmall" |
| 66 | android:textColor="?android:attr/textColorPrimary" |
| 67 | android:ellipsize="marquee" |
| 68 | android:fadingEdge="horizontal" /> |
| 69 | |
| 70 | <TextView android:id="@+android:id/summary" |
| 71 | android:layout_width="wrap_content" |
| 72 | android:layout_height="wrap_content" |
| 73 | android:layout_below="@android:id/title" |
| 74 | android:layout_alignStart="@android:id/title" |
| 75 | android:textAppearance="?android:attr/textAppearanceSmall" |
| 76 | android:textColor="?android:attr/textColorSecondary" |
| 77 | android:maxLines="4" /> |
| 78 | </RelativeLayout> |
| 79 | |
| 80 | <!--Widget if any--> |
| 81 | <LinearLayout android:id="@+android:id/widget_frame" |
| 82 | android:layout_width="wrap_content" |
| 83 | android:layout_height="match_parent" |
| 84 | android:gravity="center_vertical" |
| 85 | android:orientation="vertical" /> |
| 86 | |
| 87 | </LinearLayout> |