• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.DefaultSuggestionView"
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    <ImageView android:id="@+id/icon1"
25        style="@style/SuggestionIcon1"
26        android:scaleType="centerInside"
27        android:layout_alignParentLeft="true"
28        android:layout_alignParentTop="true"
29        android:layout_alignParentBottom="true"
30    />
31
32    <ImageView android:id="@+id/icon2"
33        style="@style/SuggestionIcon2"
34        android:scaleType="centerInside"
35        android:layout_alignParentRight="true"
36        android:layout_alignParentTop="true"
37        android:layout_alignParentBottom="true"
38        android:visibility="gone" />
39
40    <!-- The subtitle comes before the title, since the height of the title depends on whether the
41         subtitle is visible or gone. -->
42    <TextView android:id="@+id/text2"
43        style="@style/SuggestionText2"
44        android:singleLine="true"
45        android:layout_toRightOf="@id/icon1"
46        android:layout_toLeftOf="@id/icon2"
47        android:layout_alignWithParentIfMissing="true"
48        android:layout_alignParentBottom="true"
49        android:visibility="gone" />
50
51    <!-- The title is placed above the subtitle, if there is one. If there is no
52         subtitle, it fills the parent. -->
53    <TextView android:id="@+id/text1"
54        style="@style/SuggestionText1"
55        android:ellipsize="middle"
56        android:layout_toRightOf="@id/icon1"
57        android:layout_toLeftOf="@id/icon2"
58        android:layout_above="@id/text2" />
59
60</view>
61