@Test public void applyColor() throws Exception { int color = Color.GREEN; adapter.applyColor(view, color); Drawable bg = view.getBackground(); assertTrue(bg instanceof ColorDrawable); ColorDrawable cbg = (ColorDrawable) bg; assertThat(cbg.getColor(), is(color)); }
@Override public void applyColor(View view, @ColorInt int color) { view.setBackgroundColor(color); }
DefaultColorAdapter implements ColorAdapter<View> { @Override public void applyColor(View view, @ColorInt int color) { view.setBackgroundColor(color); } }
DefaultColorAdapter implements ColorAdapter<View> { @Override public void applyColor(View view, @ColorInt int color) { view.setBackgroundColor(color); }  }
DefaultColorAdapter implements ColorAdapter<View> { @Override public void applyColor(View view, @ColorInt int color) { view.setBackgroundColor(color); }  @Override void applyColor(View view, @ColorInt int color); @Override int getColor(View view); }
DefaultColorAdapter implements ColorAdapter<View> { @Override public void applyColor(View view, @ColorInt int color) { view.setBackgroundColor(color); }  @Override void applyColor(View view, @ColorInt int color); @Override int getColor(View view);  }