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
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 04a6e29..aaf4202 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -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>
diff --git a/src/com/android/contacts/group/GroupMembersFragment.java b/src/com/android/contacts/group/GroupMembersFragment.java
index 7af04cf..5ccfa24 100644
--- a/src/com/android/contacts/group/GroupMembersFragment.java
+++ b/src/com/android/contacts/group/GroupMembersFragment.java
@@ -283,8 +283,8 @@
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);
}
diff --git a/src/com/android/contacts/list/GroupMemberPickerFragment.java b/src/com/android/contacts/list/GroupMemberPickerFragment.java
index 7601a3c..03454a4 100644
--- a/src/com/android/contacts/list/GroupMemberPickerFragment.java
+++ b/src/com/android/contacts/list/GroupMemberPickerFragment.java
@@ -28,6 +28,7 @@
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 @@
setPhotoLoaderEnabled(true);
setSectionHeaderDisplayEnabled(true);
setHasOptionsMenu(true);
+ setDisplayDirectoryHeader(false);
}
@Override
@@ -227,6 +229,15 @@
// 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));
}
}