1 <?xml version="1.0" encoding="utf-8"?> 2 <!-- Copyright (C) 2011 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 <LinearLayout 18 xmlns:android="http://schemas.android.com/apk/res/android" 19 style="@style/ContactPickerLayout" 20 android:orientation="vertical" 21 android:layout_height="match_parent"> 22 <!-- Right bound should be aligned to ListView's right edge. --> 23 <!-- 24 The SearchView should have a max width to prevent the dialog from resizing to the 25 full screen width of the device. The precise value of the max width is not as important 26 because the SearchView can take on a smaller width than the max width, so in some cases it 27 will take on the automatically computed width of a dialog (based on the dialog contents) 28 from the framework. 29 --> 30 <view 31 class="android.widget.SearchView" 32 android:id="@+id/search_view" 33 android:layout_width="match_parent" 34 android:maxWidth="@dimen/contact_picker_search_view_max_width" 35 android:layout_height="wrap_content" 36 android:layout_marginLeft="0dip" 37 android:layout_marginRight="@dimen/list_visible_scrollbar_padding" 38 android:layout_marginStart="0dip" 39 android:layout_marginEnd="@dimen/list_visible_scrollbar_padding" 40 android:paddingRight="0dip" 41 android:paddingEnd="0dip" 42 android:iconifiedByDefault="false" /> 43 <!-- 44 This will contain an appropriate contacts list. Add a min height to prevent 45 the dialog from resizing too much when the search results change. The activity dialog 46 is wrap content for height in the framework, so there is no way around this. 47 --> 48 <FrameLayout 49 android:id="@+id/list_container" 50 android:layout_width="match_parent" 51 android:minHeight="@dimen/contact_picker_contact_list_min_height" 52 android:layout_height="0dip" 53 android:layout_weight="1" /> 54 55 <!-- This should look like a menu on the split action bar. --> 56 <LinearLayout 57 android:id="@+id/new_contact" 58 android:layout_width="match_parent" 59 android:layout_height="wrap_content" 60 android:minHeight="48dip" 61 android:background="@drawable/gray_action_bar_background" 62 android:paddingLeft="16dip" 63 android:paddingRight="16dip" 64 android:paddingStart="16dip" 65 android:paddingEnd="16dip"> 66 <TextView 67 android:id="@android:id/title" 68 android:layout_width="0dip" 69 android:layout_height="wrap_content" 70 android:layout_weight="1" 71 android:layout_gravity="center" 72 android:gravity="center" 73 android:duplicateParentState="true" 74 android:textAppearance="?android:attr/textAppearanceMedium" 75 android:textColor="@color/action_bar_button_text_color" 76 style="@android:style/Widget.Holo.ActionBar.TabText" 77 android:text="@string/pickerNewContactText"/> 78 </LinearLayout> 79 </LinearLayout> 80