Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 81cc3b3d authored by Brian Attwell's avatar Brian Attwell
Browse files

Contact picker: add search icon & hide searchview

Hide/unhide the SearchView when you click a seach menu item.
This is the first and more important step for b/16190113.

In a later CL, I might remove the SearchView and replace it
with the custom actionbar view created by dialer & used
in PeopleActivity.

Also merged JoinContactActivity into ContactSelectionActivity.

Bug: 16190113
Change-Id: I04bf7d22dffbf7f104362b17c9064cb386a01abe
parent 333091ae
Loading
Loading
Loading
Loading
+5 −11
Original line number Diff line number Diff line
@@ -176,6 +176,11 @@
                <data android:mimeType="vnd.android.cursor.item/postal-address_v2" />
                <data android:mimeType="vnd.android.cursor.item/postal-address" />
            </intent-filter>

            <intent-filter>
                <action android:name="com.android.contacts.action.JOIN_CONTACT" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>

        <!-- Backwards compatibility: somebody may have hard coded this activity name -->
@@ -195,17 +200,6 @@
            android:exported="true"
        />

        <!-- An activity for joining contacts -->
        <activity android:name=".activities.JoinContactActivity"
            android:theme="@style/JoinContactActivityTheme"
            android:clearTaskOnLaunch="true"
        >
            <intent-filter>
                <action android:name="com.android.contacts.action.JOIN_CONTACT" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>

        <!-- Used to set options -->
        <activity
            android:name=".preference.ContactsPreferenceActivity"
+0 −41
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2010 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.
-->

<view xmlns:android="http://schemas.android.com/apk/res/android"
    class="com.android.contacts.widget.FullHeightLinearLayout"
    style="@style/ContactPickerLayout"
    android:orientation="vertical">
    <!-- See also comments in contact_picker.xml -->
    <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" />

    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="0dip"
        android:layout_weight="1"
        android:id="@+id/list_container" />
</view>
+8 −12
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2010 The Android Open Source Project
<!-- Copyright (C) 2014 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.
@@ -13,14 +13,10 @@
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<view xmlns:android="http://schemas.android.com/apk/res/android"
    class="com.android.contacts.widget.FullHeightLinearLayout"
    style="@style/ContactPickerLayout"
    android:orientation="vertical">
    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="0dip"
        android:layout_weight="1"
        android:id="@+id/list_container" />
</view>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
    <item
        android:id="@+id/menu_search"
        android:icon="@drawable/ic_ab_search"
        android:title="@string/menu_search"
        android:showAsAction="always" />
</menu>
+0 −6
Original line number Diff line number Diff line
@@ -19,12 +19,6 @@
        <item name="android:layout_width">match_parent</item>
        <item name="android:layout_height">match_parent</item>
    </style>
    <style name="JoinContactActivityTheme" parent="ContactPickerTheme" >
        <item name="android:layout_width">match_parent</item>
        <item name="android:layout_height">match_parent</item>
        <!-- In the contact picker screen we're using adjustResize but we don't want it here. -->
        <item name="android:windowSoftInputMode">adjustUnspecified</item>
    </style>

    <style name="DetailActivityTheme" parent="@android:Theme.Dialog">
        <item name="android:windowContentOverlay">@null</item>
+0 −3
Original line number Diff line number Diff line
@@ -171,9 +171,6 @@
        <item name="android:layout_height">match_parent</item>
    </style>

    <style name="JoinContactActivityTheme" parent="ContactPickerTheme" >
    </style>

    <style name="ContactsPreferencesTheme" parent="@style/PeopleTheme">
        <item name="android:listViewStyle">@style/ListViewStyle</item>
    </style>
Loading