diff options
author | Mindy Pereira <mindyp@google.com> | 2011-07-25 13:21:10 -0700 |
---|---|---|
committer | Mindy Pereira <mindyp@google.com> | 2011-07-25 13:22:49 -0700 |
commit | 886150f6f05991d33a57213274bd51f94140f4e3 (patch) | |
tree | 8c37f3a53f0efda191aca86925f745503c547430 /chips/src/com/android | |
parent | ae905458d587a9cae0dc0adfa2155342fbdb4947 (diff) | |
download | android_frameworks_ex-886150f6f05991d33a57213274bd51f94140f4e3.tar.gz android_frameworks_ex-886150f6f05991d33a57213274bd51f94140f4e3.tar.bz2 android_frameworks_ex-886150f6f05991d33a57213274bd51f94140f4e3.zip |
These extra separators are not needed given the design.
In this pass, making the associated methods non abstract.
will remove them from the apps, then remove the deprecated methods.
Change-Id: I3f9908e5807253294630c17e52ae6562abd0ddc3
Diffstat (limited to 'chips/src/com/android')
-rw-r--r-- | chips/src/com/android/ex/chips/BaseRecipientAdapter.java | 23 | ||||
-rw-r--r-- | chips/src/com/android/ex/chips/RecipientEntry.java | 16 |
2 files changed, 12 insertions, 27 deletions
diff --git a/chips/src/com/android/ex/chips/BaseRecipientAdapter.java b/chips/src/com/android/ex/chips/BaseRecipientAdapter.java index b8194d0..8b2bc5e 100644 --- a/chips/src/com/android/ex/chips/BaseRecipientAdapter.java +++ b/chips/src/com/android/ex/chips/BaseRecipientAdapter.java @@ -675,11 +675,7 @@ public abstract class BaseRecipientAdapter extends BaseAdapter implements Filter entries.add(entry); tryFetchPhoto(entry); validEntryCount++; - if (i < size - 1) { - entries.add(RecipientEntry.SEP_WITHIN_GROUP); - } } - entries.add(RecipientEntry.SEP_NORMAL); if (validEntryCount > mPreferredMaxResultCount) { break; } @@ -692,7 +688,6 @@ public abstract class BaseRecipientAdapter extends BaseAdapter implements Filter entries.add(entry); tryFetchPhoto(entry); - entries.add(RecipientEntry.SEP_NORMAL); validEntryCount++; } } @@ -850,14 +845,6 @@ public abstract class BaseRecipientAdapter extends BaseAdapter implements Filter public View getView(int position, View convertView, ViewGroup parent) { final RecipientEntry entry = mEntries.get(position); switch (entry.getEntryType()) { - case RecipientEntry.ENTRY_TYPE_SEP_NORMAL: { - return convertView != null ? convertView - : mInflater.inflate(getSeparatorLayout(), parent, false); - } - case RecipientEntry.ENTRY_TYPE_SEP_WITHIN_GROUP: { - return convertView != null ? convertView - : mInflater.inflate(getSeparatorWithinGroupLayout(), parent, false); - } case RecipientEntry.ENTRY_TYPE_WAITING_FOR_DIRECTORY_SEARCH: { return convertView != null ? convertView : mInflater.inflate(getWaitingForDirectorySearchLayout(), parent, false); @@ -924,11 +911,17 @@ public abstract class BaseRecipientAdapter extends BaseAdapter implements Filter */ protected abstract int getItemLayout(); /** Returns a layout id for a separator dividing two person or groups. */ - protected abstract int getSeparatorLayout(); + @Deprecated + protected int getSeparatorLayout() { + return -1; + } /** * Returns a layout id for a separator dividing two destinations for a same person or group. */ - protected abstract int getSeparatorWithinGroupLayout(); + @Deprecated + protected int getSeparatorWithinGroupLayout() { + return -1; + } /** * Returns a layout id for a view showing "waiting for more contacts". */ diff --git a/chips/src/com/android/ex/chips/RecipientEntry.java b/chips/src/com/android/ex/chips/RecipientEntry.java index d22d5b1..f307b25 100644 --- a/chips/src/com/android/ex/chips/RecipientEntry.java +++ b/chips/src/com/android/ex/chips/RecipientEntry.java @@ -35,18 +35,10 @@ public class RecipientEntry { /* package */ static final int INVALID_DESTINATION_TYPE = -1; public static final int ENTRY_TYPE_PERSON = 0; - public static final int ENTRY_TYPE_SEP_NORMAL = 1; - public static final int ENTRY_TYPE_SEP_WITHIN_GROUP = 2; - public static final int ENTRY_TYPE_WAITING_FOR_DIRECTORY_SEARCH = 3; - - public static final int ENTRY_TYPE_SIZE = 4; - - /** Separator entry dividing two persons or groups. */ - public static final RecipientEntry SEP_NORMAL = - new RecipientEntry(ENTRY_TYPE_SEP_NORMAL); - /** Separator entry dividing two entries inside a person or a group. */ - public static final RecipientEntry SEP_WITHIN_GROUP = - new RecipientEntry(ENTRY_TYPE_SEP_WITHIN_GROUP); + public static final int ENTRY_TYPE_WAITING_FOR_DIRECTORY_SEARCH = 1; + + public static final int ENTRY_TYPE_SIZE = 2; + public static final RecipientEntry WAITING_FOR_DIRECTORY_SEARCH = new RecipientEntry(ENTRY_TYPE_WAITING_FOR_DIRECTORY_SEARCH); |