Fixed introduced crash.
This commit is contained in:
parent
7c4161cf1b
commit
4b695ba06c
1 changed files with 3 additions and 3 deletions
|
@ -154,9 +154,9 @@ public class ContextMenuAdapter {
|
||||||
tv.setCompoundDrawables(imageId, null, null, null);
|
tv.setCompoundDrawables(imageId, null, null, null);
|
||||||
tv.setCompoundDrawablePadding(paddingInPixels);
|
tv.setCompoundDrawablePadding(paddingInPixels);
|
||||||
} else {
|
} else {
|
||||||
|
if (item.getLightIcon() != -1) {
|
||||||
Drawable drawable = ContextCompat.getDrawable(getContext(), item.getLightIcon());
|
Drawable drawable = ContextCompat.getDrawable(getContext(), item.getLightIcon());
|
||||||
DrawableCompat.setTint(drawable, item.getThemedColor(getContext()));
|
DrawableCompat.setTint(drawable, item.getThemedColor(getContext()));
|
||||||
if (drawable != null) {
|
|
||||||
((AppCompatImageView) convertView.findViewById(R.id.icon)).setImageDrawable(drawable);
|
((AppCompatImageView) convertView.findViewById(R.id.icon)).setImageDrawable(drawable);
|
||||||
convertView.findViewById(R.id.icon).setVisibility(View.VISIBLE);
|
convertView.findViewById(R.id.icon).setVisibility(View.VISIBLE);
|
||||||
} else if (convertView.findViewById(R.id.icon) != null) {
|
} else if (convertView.findViewById(R.id.icon) != null) {
|
||||||
|
|
Loading…
Reference in a new issue