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

Commit 1114fde4 authored by Wenyi Wang's avatar Wenyi Wang
Browse files

Show count of contacts in account and group view

* Change contact list item height from 64dp to 56dp per b/29831679.
* Move name view in contact list item up by 2dp, per UX.
* Change the top padding to 8dp per b/29831679.

* Show the header in: account view, group member view and group member
  picker view.
* Set top padding for list view only when there's no account header.
* Change action bar title to "From <account>" in account view.
* Override onScrollListener to hide and show header divider.

Bug 29190106
Bug 29831679

Change-Id: I36a2083c91b6b052bf887a8e7c639085d2bf4691
parent 62870eca
Loading
Loading
Loading
Loading
+30 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>

<!--
  ~ Copyright (C) 2016 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
  -->

<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item>
        <shape android:shape="rectangle">
            <solid android:color="@color/list_item_account_header_border_color" />
        </shape>
    </item>
    <item android:bottom="1dp">
        <shape android:shape="rectangle">
            <solid android:color="@color/background_primary" />
        </shape>
    </item>
</layer-list>
 No newline at end of file
+3 −0
Original line number Diff line number Diff line
@@ -60,6 +60,9 @@
    <!-- Background color of pinned header items. -->
    <color name="list_item_pinned_header_color">@color/background_primary</color>

    <!-- 8% black. -->
    <color name="list_item_account_header_border_color">#15000000</color>

    <!-- Color of the mime-type icons inside the editor. 50% black. -->
    <color name="editor_icon_color">#7f7f7f</color>

+3 −1
Original line number Diff line number Diff line
@@ -260,7 +260,9 @@
      @dimen/contact_browser_list_item_photo_size) / 2 or greater. Otherwise, this padding
      will never take affect inside list items. As a result, the padding at the very top
      of ListView's will not match the padding inside list items -->
    <dimen name="contact_browser_list_item_padding_top_or_bottom">12dp</dimen>
    <dimen name="contact_browser_list_item_padding_top_or_bottom">8dp</dimen>

    <dimen name="contact_browser_list_item_height">56dp</dimen>

    <!-- Ideal item width in photo picker -->
    <dimen name="photo_picker_item_ideal_width">135dp</dimen>
+12 −0
Original line number Diff line number Diff line
@@ -206,6 +206,18 @@
        <item quantity="other">Contacts deleted</item>
    </plurals>

    <!-- List header indicating the number of contacts in the list [CHAR LIMIT=30] -->
    <plurals name="contacts_count">
        <item quantity="one">1 contact</item>
        <item quantity="other"><xliff:g id="count">%d</xliff:g> contacts</item>
    </plurals>

    <!-- Activity title indicating contacts are from a Google account [CHAR LIMIT=30] -->
    <string name="title_from_google">From Google</string>

    <!-- Activity title indicating contacts are from a specific account [CHAR LIMIT=15] -->
    <string name="title_from_other_accounts">From <xliff:g id="account">%s</xliff:g></string>

    <!-- Menu item that opens the Options activity for a given contact [CHAR LIMIT=15] -->
    <string name="menu_set_ring_tone">Set ringtone</string>

+4 −2
Original line number Diff line number Diff line
@@ -59,7 +59,7 @@
        <item name="android:colorPrimary">@color/primary_color</item>
        <item name="android:colorAccent">@color/primary_color</item>
        <item name="android:alertDialogTheme">@style/ContactsAlertDialogTheme</item>
        <item name="list_item_height">?android:attr/listPreferredItemHeight</item>
        <item name="list_item_height">@dimen/contact_browser_list_item_height</item>
        <item name="activated_background">@drawable/list_item_activated_background</item>
        <item name="section_header_background">@drawable/list_title_holo</item>
        <item name="list_section_header_height">24dip</item>
@@ -91,6 +91,7 @@
        <item name="contact_browser_list_padding_right">0dip</item>
        <item name="contact_browser_background">@color/background_primary</item>
        <item name="list_item_text_indent">@dimen/contact_browser_list_item_text_indent</item>
        <item name="list_item_text_offset_top">-2dp</item>
        <!-- Favorites -->
        <item name="favorites_padding_bottom">0dip</item>
    </style>
@@ -134,7 +135,7 @@
        <item name="colorAccent">@color/primary_color</item>
        <item name="android:alertDialogTheme">@style/ContactsAlertDialogThemeAppCompat</item>
        <item name="alertDialogTheme">@style/ContactsAlertDialogThemeAppCompat</item>
        <item name="list_item_height">?android:attr/listPreferredItemHeight</item>
        <item name="list_item_height">@dimen/contact_browser_list_item_height</item>
        <item name="activated_background">@drawable/list_item_activated_background</item>
        <item name="section_header_background">@drawable/list_title_holo</item>
        <item name="list_section_header_height">24dip</item>
@@ -169,6 +170,7 @@
        <item name="contact_browser_list_padding_right">0dip</item>
        <item name="contact_browser_background">@color/background_primary</item>
        <item name="list_item_text_indent">@dimen/contact_browser_list_item_text_indent</item>
        <item name="list_item_text_offset_top">-2dp</item>
        <!-- Favorites -->
        <item name="favorites_padding_bottom">0dip</item>
        <item name="drawerArrowStyle">@style/DrawerArrowStyle</item>
Loading