blob: adcfd920c690b2ffae52180e8932680ee0f49891 [file] [log] [blame]
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2011 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
style="@style/ContactPickerLayout"
android:orientation="vertical"
android:layout_height="match_parent">
<!-- Right bound should be aligned to ListView's right edge. -->
<!--
The SearchView should have a max width to prevent the dialog from resizing to the
full screen width of the device. The precise value of the max width is not as important
because the SearchView can take on a smaller width than the max width, so in some cases it
will take on the automatically computed width of a dialog (based on the dialog contents)
from the framework.
-->
<view
class="android.widget.SearchView"
android:id="@+id/search_view"
android:layout_width="match_parent"
android:maxWidth="@dimen/contact_picker_search_view_max_width"
android:layout_height="wrap_content"
android:layout_marginLeft="0dip"
android:layout_marginRight="@dimen/list_visible_scrollbar_padding"
android:layout_marginStart="0dip"
android:layout_marginEnd="@dimen/list_visible_scrollbar_padding"
android:paddingRight="0dip"
android:paddingEnd="0dip"
android:iconifiedByDefault="false" />
<!--
This will contain an appropriate contacts list. Add a min height to prevent
the dialog from resizing too much when the search results change. The activity dialog
is wrap content for height in the framework, so there is no way around this.
-->
<FrameLayout
android:id="@+id/list_container"
android:layout_width="match_parent"
android:minHeight="@dimen/contact_picker_contact_list_min_height"
android:layout_height="0dip"
android:layout_weight="1" />
<!-- This should look like a menu on the split action bar. -->
<LinearLayout
android:id="@+id/new_contact"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="48dip"
android:background="@drawable/gray_action_bar_background"
android:paddingLeft="16dip"
android:paddingRight="16dip"
android:paddingStart="16dip"
android:paddingEnd="16dip">
<TextView
android:id="@android:id/title"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_gravity="center"
android:gravity="center"
android:duplicateParentState="true"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/action_bar_button_text_color"
style="@android:style/Widget.Holo.ActionBar.TabText"
android:text="@string/pickerNewContactText"/>
</LinearLayout>
</LinearLayout>