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

Commit 6406adb1 authored by Tingting Wang's avatar Tingting Wang
Browse files

Add account header to label view.

Add the account that owns the group to:
1) the group members fragment (including edit mode)
and
2) the group member picker activity (including in search mode)

BUG 29766091

Change-Id: If476445ff0fe6e34e8213cffb993832eddc18b9a
parent 5eb7c3ff
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -285,13 +285,6 @@
    <!-- The text displayed when the contacts list is empty while displaying all contacts [CHAR LIMIT=NONE] -->
    <string name="noContacts">No contacts</string>

    <!-- Label list header title with the number of members in the label. [CHAR LIMIT=30] -->
    <plurals name="group_members_count">
        <item quantity="zero">No contacts</item>
        <item quantity="one">1 contact</item>
        <item quantity="other"><xliff:g id="count">%d</xliff:g> contacts</item>
    </plurals>

    <!-- The text displayed when the labels list is empty while displaying all labels [CHAR LIMIT=30] -->
    <string name="noGroups">No labels.</string>

+2 −2
Original line number Diff line number Diff line
@@ -283,8 +283,8 @@ public class GroupMembersFragment extends MultiSelectContactsListFragment<GroupM

            final TextView accountFilterHeader = (TextView) accountFilterContainer.findViewById(
                    R.id.account_filter_header);
            accountFilterHeader.setText(getResources().getQuantityString(
                    R.plurals.group_members_count, memberCount, memberCount));
            accountFilterHeader.setText(mGroupMetadata.accountName);
            accountFilterHeader.setAllCaps(false);
        } else {
            accountFilterContainer.setVisibility(View.GONE);
        }
+11 −0
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.android.contacts.activities.ContactSelectionActivity;
import com.android.contacts.common.R;
@@ -185,6 +186,7 @@ public class GroupMemberPickerFragment extends
        setPhotoLoaderEnabled(true);
        setSectionHeaderDisplayEnabled(true);
        setHasOptionsMenu(true);
        setDisplayDirectoryHeader(false);
    }

    @Override
@@ -227,6 +229,15 @@ public class GroupMemberPickerFragment extends
            // Wait until contacts are loaded before showing the scrollbar
            setVisibleScrollbarEnabled(true);

            // Bind account filter header.
            final View accountFilterContainer = getView().findViewById(
                    R.id.account_filter_header_container);
            accountFilterContainer.setVisibility(View.VISIBLE);
            final TextView accountFilterHeader = (TextView) accountFilterContainer.findViewById(
                    R.id.account_filter_header);
            accountFilterHeader.setText(mAccountName);
            accountFilterHeader.setAllCaps(false);

            super.onLoadFinished(loader, new FilterCursorWrapper(data));
        }
    }