(int icon)
| 284 | } |
| 285 | |
| 286 | public void setIcon(int icon) { |
| 287 | if (icon != 0) { |
| 288 | iconDrawable = getResources().getDrawable(icon).mutate(); |
| 289 | if (iconDrawable != null) { |
| 290 | iconDrawable.setColorFilter(new PorterDuffColorFilter(lastIconColor = Theme.getColor(isChecked ? trackCheckedColorKey : trackColorKey), PorterDuff.Mode.MULTIPLY)); |
| 291 | } |
| 292 | } else { |
| 293 | iconDrawable = null; |
| 294 | } |
| 295 | } |
| 296 | |
| 297 | public boolean hasIcon() { |
| 298 | return iconDrawable != null; |
nothing calls this directly
no test coverage detected