@Test public void testSetIcon() { final ColorDrawable drawable = new ColorDrawable(Color.CYAN); IconMixin mixin = new IconMixin(mTemplateLayout, null, 0); mixin.setIcon(drawable); assertSame(drawable, mIconView.getDrawable()); }
public void setIcon(Drawable icon) { final ImageView iconView = getView(); if (iconView != null) { iconView.setImageDrawable(icon); } }
IconMixin implements Mixin { public void setIcon(Drawable icon) { final ImageView iconView = getView(); if (iconView != null) { iconView.setImageDrawable(icon); } } }
IconMixin implements Mixin { public void setIcon(Drawable icon) { final ImageView iconView = getView(); if (iconView != null) { iconView.setImageDrawable(icon); } } IconMixin(TemplateLayout layout, AttributeSet attrs, int defStyleAttr); }
IconMixin implements Mixin { public void setIcon(Drawable icon) { final ImageView iconView = getView(); if (iconView != null) { iconView.setImageDrawable(icon); } } IconMixin(TemplateLayout layout, AttributeSet attrs, int defStyleAttr); void setIcon(Drawable icon); Drawable getIcon(); }
IconMixin implements Mixin { public void setIcon(Drawable icon) { final ImageView iconView = getView(); if (iconView != null) { iconView.setImageDrawable(icon); } } IconMixin(TemplateLayout layout, AttributeSet attrs, int defStyleAttr); void setIcon(Drawable icon); Drawable getIcon();  }