diff options
author | stefan-niedermann <info@niedermann.it> | 2019-10-16 20:29:55 +0300 |
---|---|---|
committer | stefan-niedermann <info@niedermann.it> | 2019-10-16 20:29:55 +0300 |
commit | ae01d10e1a298240d4902130b83daad257819116 (patch) | |
tree | c97905417479138836f6766cf686aae3747afced /app/src/main/java/it/niedermann/nextcloud/deck/ui/card/LabelAutoCompleteAdapter.java | |
parent | 51bc800c6daec84dc9b30716ed8abee1f8a6e3cf (diff) |
Fix icon for label proposals #52
Diffstat (limited to 'app/src/main/java/it/niedermann/nextcloud/deck/ui/card/LabelAutoCompleteAdapter.java')
-rw-r--r-- | app/src/main/java/it/niedermann/nextcloud/deck/ui/card/LabelAutoCompleteAdapter.java | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/ui/card/LabelAutoCompleteAdapter.java b/app/src/main/java/it/niedermann/nextcloud/deck/ui/card/LabelAutoCompleteAdapter.java index f475274a0..e67eed7ee 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/ui/card/LabelAutoCompleteAdapter.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/ui/card/LabelAutoCompleteAdapter.java @@ -93,14 +93,13 @@ public class LabelAutoCompleteAdapter extends BaseAdapter implements Filterable convertView.setTag(holder); } + int iconResource = R.drawable.ic_label_grey600_24dp; + if((lastFilterText != null && lastFilterText.length() > 0) && (position == labelList.size() - (canManage ? 1 : 0))) { + iconResource = R.drawable.ic_plus; + } + holder.icon.setImageDrawable( - ViewUtil.getTintedImageView( - context, - (position < labelList.size() - (canManage ? 1 : 0)) && - (lastFilterText != null && lastFilterText.length() > 0) - ? R.drawable.ic_plus - : R.drawable.ic_label_grey600_24dp, - "#" + getItem(position).getColor() + ViewUtil.getTintedImageView(context, iconResource,"#" + getItem(position).getColor() )); holder.label.setText(getItem(position).getTitle()); return convertView; |