Home | History | Annotate | Download | only in layout
      1 <?xml version="1.0" encoding="utf-8"?>
      2 <!-- Copyright (C) 2010 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 <!-- Custom layout almost same as original preference.xml in framework.
     18      One (current) only difference is this layout doesn't have a spacer
     19      on the left side of the preference. -->
     20 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     21     android:layout_width="match_parent"
     22     android:layout_height="wrap_content"
     23     android:minHeight="?android:attr/listPreferredItemHeight"
     24     android:gravity="center_vertical"
     25     android:paddingEnd="?android:attr/scrollbarSize">
     26 
     27     <!-- <View
     28         android:layout_width="@dimen/preference_widget_width"
     29         android:layout_height="match_parent" /> -->
     30 
     31     <RelativeLayout
     32         android:layout_width="wrap_content"
     33         android:layout_height="wrap_content"
     34         android:layout_marginStart="6dip"
     35         android:layout_marginEnd="6dip"
     36         android:layout_marginTop="6dip"
     37         android:layout_marginBottom="6dip"
     38         android:layout_weight="1">
     39 
     40         <TextView android:id="@+android:id/title"
     41             android:layout_width="wrap_content"
     42             android:layout_height="wrap_content"
     43             android:singleLine="true"
     44             android:textAppearance="?android:attr/textAppearanceMedium"
     45             android:ellipsize="marquee"
     46             android:fadingEdge="horizontal" />
     47 
     48         <TextView android:id="@+android:id/summary"
     49             android:layout_width="wrap_content"
     50             android:layout_height="wrap_content"
     51             android:layout_below="@android:id/title"
     52             android:layout_alignStart="@android:id/title"
     53             android:textAppearance="?android:attr/textAppearanceSmall"
     54             android:textColor="?android:attr/textColorSecondary"
     55             android:maxLines="4" />
     56 
     57     </RelativeLayout>
     58 
     59     <!-- Preference should place its actual preference widget here. -->
     60     <LinearLayout android:id="@+android:id/widget_frame"
     61         android:layout_width="wrap_content"
     62         android:layout_height="match_parent"
     63         android:gravity="center_vertical"
     64         android:orientation="vertical" />
     65 
     66 </LinearLayout>
     67