diff options
| author | Jin Cao <jinyan@google.com> | 2014-08-06 14:29:14 -0700 |
|---|---|---|
| committer | Jin Cao <jinyan@google.com> | 2014-08-06 14:43:07 -0700 |
| commit | b58c9a621a250c6119be2d5a77164b940a8559b0 (patch) | |
| tree | 12ab7ff79976308157060065e10a034a3973f3d6 /src | |
| parent | 46737050a95486de5f2a05851f22ec823ebd085a (diff) | |
| download | android_frameworks_opt_chips-b58c9a621a250c6119be2d5a77164b940a8559b0.tar.gz android_frameworks_opt_chips-b58c9a621a250c6119be2d5a77164b940a8559b0.tar.bz2 android_frameworks_opt_chips-b58c9a621a250c6119be2d5a77164b940a8559b0.zip | |
[Quantum chips] add custom dividers for autocomplete
b/16818548
Change-Id: Idb3a112af7a16f05bfcf9e2f9ae14f3ef32aecef
Diffstat (limited to 'src')
| -rw-r--r-- | src/com/android/ex/chips/DropdownChipLayouter.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/com/android/ex/chips/DropdownChipLayouter.java b/src/com/android/ex/chips/DropdownChipLayouter.java index 3327833..6c9a694 100644 --- a/src/com/android/ex/chips/DropdownChipLayouter.java +++ b/src/com/android/ex/chips/DropdownChipLayouter.java @@ -112,6 +112,11 @@ public class DropdownChipLayouter { displayName = null; showImage = false; } + + // For BASE_RECIPIENT set all top dividers except for the first one to be GONE. + if (viewHolder.topDivider != null) { + viewHolder.topDivider.setVisibility(position == 0 ? View.VISIBLE : View.GONE); + } break; case RECIPIENT_ALTERNATES: if (position != 0) { @@ -334,6 +339,7 @@ public class DropdownChipLayouter { public final TextView destinationTypeView; public final ImageView imageView; public final ImageView deleteView; + public final View topDivider; public ViewHolder(View view) { displayNameView = (TextView) view.findViewById(getDisplayNameResId()); @@ -341,6 +347,7 @@ public class DropdownChipLayouter { destinationTypeView = (TextView) view.findViewById(getDestinationTypeResId()); imageView = (ImageView) view.findViewById(getPhotoResId()); deleteView = (ImageView) view.findViewById(getDeleteResId()); + topDivider = view.findViewById(R.id.chip_autocomplete_top_divider); } } } |
