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

Commit 9b910487 authored by Daisuke Miyakawa's avatar Daisuke Miyakawa
Browse files

[Phone] New phone favorite tab.

This change introduces yet another fragment for a special
"phone favorite + phone all" screen and uses it as Phone UI's
"Favorite" tab instead of using ContactTileListFragment.

The new fragment merges two adapters into one adapter called
PhoneFavoriteMergedAdapter. To keep layout consistency between
two adapters, the new adapter tweaks original Views on demand,
especially paddings for those Views.

Now that "favorite" screen contains "all phone" section, we should
treat previous "all phone" screen (PhoneNumberPickerFragment) as
"phone search" screen instead. To do that, this change also replaces
"ALL CONTACTS" strings/icons with "search" magnifying glass icons.
IME is now shown up upon the search button click again.

Bug: 5359840
Change-Id: I04cb2433882d74f1e826c02991a5a54c3be993ab
parent aa833a38
Loading
Loading
Loading
Loading
+1.65 KiB
Loading image diff...
+1.11 KiB
Loading image diff...
+2.4 KiB
Loading image diff...
+47 −0
Original line number Diff line number Diff line
<?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.
-->

<!-- Layout showing the type of account filter
     (e.g. All contacts filter, custom filter, etc.),
     which is the header of all contact lists. -->
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/account_filter_header_container"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:minHeight="?attr/list_item_header_height"
    android:orientation="vertical"
    android:paddingTop="@dimen/contact_browser_list_top_margin"
    android:layout_marginLeft="@dimen/contact_browser_list_header_left_margin"
    android:layout_marginRight="@dimen/contact_browser_list_header_right_margin"
    android:background="?android:attr/selectableItemBackground"
    android:visibility="gone">
    <TextView
        android:id="@+id/account_filter_header"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:singleLine="true"
        android:ellipsize="end"
        android:textStyle="bold"
        android:textAllCaps="true"
        android:paddingLeft="@dimen/contact_browser_list_item_text_indent"
        android:textAppearance="?android:attr/textAppearanceSmall"
        android:textColor="?android:attr/textColorSecondary" />
    <View
        android:id="@+id/account_filter_header_bottom_divider"
        android:layout_height="1dip"
        style="@style/SectionDivider" />
</LinearLayout>
+2 −26
Original line number Diff line number Diff line
@@ -29,33 +29,9 @@

    <!-- Shown only when an Account filter is set.
         - paddingTop should be here to show "shade" effect correctly. -->
    <LinearLayout
    <include
        android:id="@+id/account_filter_header_container"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:minHeight="?attr/list_item_header_height"
        android:orientation="vertical"
        android:paddingTop="@dimen/contact_browser_list_top_margin"
        android:layout_marginLeft="@dimen/contact_browser_list_header_left_margin"
        android:layout_marginRight="@dimen/contact_browser_list_header_right_margin"
        android:background="?android:attr/selectableItemBackground"
        android:visibility="gone">
        <TextView
            android:id="@+id/account_filter_header"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:singleLine="true"
            android:ellipsize="end"
            android:textStyle="bold"
            android:textAllCaps="true"
            android:paddingLeft="@dimen/contact_browser_list_item_text_indent"
            android:textAppearance="?android:attr/textAppearanceSmall"
            android:textColor="?android:attr/textColorSecondary" />
        <View
            android:id="@+id/account_filter_header_bottom_divider"
            android:layout_height="1dip"
            style="@style/SectionDivider" />
    </LinearLayout>
        layout="@layout/account_filter_header" />

    <view
        class="com.android.contacts.widget.PinnedHeaderListView"
Loading