Home | History | Annotate | Download | only in layout
      1 <?xml version="1.0" encoding="utf-8"?>
      2 <!-- Copyright (C) 2009 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 <view
     18     xmlns:android="http://schemas.android.com/apk/res/android"
     19     class="com.android.quicksearchbox.ui.ContactSuggestionView"
     20     style="@style/Suggestion">
     21 
     22     <!-- Icons come first in the layout, since their placement doesn't depend on
     23          the placement of the text views. -->
     24 
     25     <LinearLayout android:id="@+id/contact_container"
     26         style="@style/SuggestionIcon1"
     27         android:layout_alignParentLeft="true"
     28         android:layout_alignParentTop="true"
     29         android:layout_alignParentBottom="true"
     30         android:gravity="center"
     31     >
     32         <com.android.quicksearchbox.ui.ContactBadge android:id="@+id/icon1"
     33             style="?android:attr/quickContactBadgeStyleSmallWindowSmall"/>
     34     </LinearLayout>
     35 
     36     <ImageView android:id="@+id/icon2"
     37         style="@style/SuggestionIcon2"
     38         android:scaleType="centerInside"
     39         android:layout_alignParentRight="true"
     40         android:layout_alignParentTop="true"
     41         android:layout_alignParentBottom="true"
     42         android:visibility="gone" />
     43 
     44     <!-- The subtitle comes before the title, since the height of the title depends on whether the
     45          subtitle is visible or gone. -->
     46     <TextView android:id="@+id/text2"
     47         style="@style/SuggestionText2"
     48         android:singleLine="true"
     49         android:layout_toRightOf="@id/contact_container"
     50         android:layout_toLeftOf="@id/icon2"
     51         android:layout_alignWithParentIfMissing="true"
     52         android:layout_alignParentBottom="true"
     53         android:visibility="gone" />
     54 
     55     <!-- The title is placed above the subtitle, if there is one. If there is no
     56          subtitle, it fills the parent. -->
     57     <TextView android:id="@+id/text1"
     58         style="@style/SuggestionText1"
     59         android:layout_toRightOf="@id/contact_container"
     60         android:layout_toLeftOf="@id/icon2"
     61         android:layout_above="@id/text2" />
     62 
     63 </view>
     64