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

Commit 8f59c2b1 authored by Daisuke Miyakawa's avatar Daisuke Miyakawa
Browse files

Reflect recent UX design changes around filter capability

Include several related changes

- introduce filter option in phone search
-- have limited filter support in PhoneNumberListAdapter. There's
   no easy way to share the logic for filtering as People UI
   is taking care of Contacts/RawContacts table while Phone UI
   needs to take care of Data table, though we may be able to have
   some utility library for filter operations.
- have additonal layouts for filtered phone search. Along with it,
  also introduce some pixel-perfect design for Phone/People apps
  both for phone and tablet
- add "up" capability for CustomContactListFilterActivity
- launch CustomContactListFilterActivity directly from
  AccountFilterActivity instead of relying on
  their parent Activities (PeopleActivity and DialtactsActivity).
-- In the current structure, IME is shown during migrating
   from AccountFilterActivity to CustomContactListFilterActivity
   "only in Phone UI", as SearchView temporarily has a focus

FUTURE TODO:
Currently devices without hard menu key show overflow menu in
Phone search mode, while we want soft button on the right side
of search view.

Bug: 5104984
Bug: 5081251
Bug: 5121569
Change-Id: If935f13b33b105884a914b207fd096588825226e
parent cf27dd8f
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -40,11 +40,6 @@
            android:background="@drawable/list_background_holo"
            android:visibility="gone">

            <View
                style="@style/SectionDivider"
                android:layout_marginLeft="40dip"
                android:layout_marginTop="24dip" />

            <!-- All -->
            <fragment
                android:id="@+id/all_fragment"
+3 −1
Original line number Diff line number Diff line
@@ -25,7 +25,9 @@
        android:id="@android:id/list"
        android:layout_width="match_parent"
        android:layout_height="0dip"
        android:layout_weight="1" />
        android:layout_weight="1"
        android:layout_marginLeft="@dimen/contact_filter_left_margin"
        android:layout_marginRight="@dimen/contact_filter_right_margin" />

    <View
        android:layout_width="match_parent"
+2 −2
Original line number Diff line number Diff line
@@ -25,8 +25,8 @@
        android:layout_width="match_parent"
        android:layout_height="0dip"
        android:layout_weight="1"
        android:layout_marginLeft="16dip"
        android:layout_marginRight="16dip"/>
        android:layout_marginLeft="@dimen/contact_filter_left_margin"
        android:layout_marginRight="@dimen/contact_filter_right_margin" />

    <View
        android:layout_width="match_parent"
+8 −13
Original line number Diff line number Diff line
@@ -17,32 +17,27 @@
<view
    xmlns:android="http://schemas.android.com/apk/res/android"
    class="com.android.contacts.list.ContactListFilterView"
    android:layout_height="52dip"
    android:layout_width="fill_parent"
    android:paddingLeft="7dip"
    android:paddingRight="7dip"
    android:paddingTop="2dip"
    android:paddingBottom="2dip"
    android:gravity="left">
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:minHeight="@dimen/contact_filter_item_min_height">

    <View
        android:id="@+id/indent"
        android:layout_width="40dip"
        android:layout_width="32dip"
        android:layout_height="fill_parent" />

    <ImageView
        android:id="@+id/icon"
        android:scaleType="fitCenter"
        android:layout_width="24dip"
        android:layout_height="24dip"
        android:layout_marginLeft="8dip"
        android:layout_marginRight="7dip"
        android:layout_width="@dimen/contact_filter_icon_size"
        android:layout_height="@dimen/contact_filter_icon_size"
        android:layout_gravity="center_vertical" />

    <TextView
        android:id="@+id/label"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_height="match_parent"
        android:layout_marginLeft="8dip"
        android:textAppearance="?android:attr/textAppearanceMedium"
        android:gravity="center_vertical"
        android:ellipsize="end" />
+30 −12
Original line number Diff line number Diff line
@@ -14,10 +14,14 @@
     limitations under the License.
-->

<!-- android:paddingTop is used instead of android:layout_marginTop. It looks
     android:layout_marginTop is ignored when used with <fragment></fragment>, which
     only happens in Tablet UI since we rely on ViewPager in Phone UI.
     Instead, android:layout_marginTop inside <fragment /> is effective. -->
<FrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/pinned_header_list_layout"
    android:layout_marginTop="@dimen/contact_browser_list_top_margin"
    android:paddingTop="@dimen/contact_browser_list_top_margin"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >
    <LinearLayout
@@ -25,24 +29,38 @@
        android:layout_height="match_parent"
        android:orientation="vertical">

        <!-- Shown only when an Account filter is set. -->
        <LinearLayout
            android:id="@+id/account_filter_header_container"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:layout_marginLeft="@dimen/contact_browser_list_header_left_margin"
            android:layout_marginRight="@dimen/contact_browser_list_header_right_margin"
            android:visibility="gone">
            <TextView
                android:id="@+id/account_filter_header"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:minHeight="@dimen/contact_filter_header_min_height"
                android:layout_marginLeft="8dip"
                android:singleLine="true"
                android:ellipsize="end"
            android:gravity="center"
            android:padding="5dip"
                android:gravity="left"
                android:textAppearance="?android:attr/textAppearanceSmall"
            android:textColor="@android:color/white"
            android:background="@android:color/black"
            android:visibility="gone" />
                android:textColor="?android:attr/textColorSecondary" />
            <View
                android:id="@+id/account_filter_header_bottom_divider"
                style="@style/SectionDivider" />
        </LinearLayout>

        <view
            class="com.android.contacts.list.ContactEntryListView"
            android:id="@android:id/list"
            android:layout_width="match_parent"
            android:layout_height="0dip"
            android:layout_marginLeft="@dimen/contact_browser_list_left_margin"
            android:layout_marginRight="@dimen/contact_browser_list_right_margin"
            android:fastScrollEnabled="true"
            android:layout_weight="1" />

@@ -61,7 +79,7 @@
        android:ellipsize="end"
        android:gravity="right"
        android:layout_gravity="top|right"
        android:textAppearance="?android:attr/textAppearanceMedium"
        android:textAppearance="?android:attr/textAppearanceSmall"
        android:textColor="@color/contact_count_text_color"
        android:background="@color/contact_browser_list_bk_color" />
</FrameLayout>
Loading