public S hasCurrentHintTextColor(int color) { isNotNull(); int actualColor = actual.getCurrentHintTextColor(); assertThat(actualColor) // .overridingErrorMessage("Expected current hint text color <%s> but was <%s>.", Integer.toHexString(color), Integer.toHexString(actualColor)) // .isEqualTo(color); return myself; }
@Test public void shouldSetHintAndHintColorWhileInflatingXmlLayout() throws Exception { Activity activity = activityController.get(); activity.setContentView(R.layout.text_views_hints); TextView black = (TextView) activity.findViewById(R.id.black_text_view_hint); assertThat(black.getHint().toString()).isEqualTo("Black Hint"); assertThat(black.getCurrentHintTextColor()).isEqualTo(0xff000000); TextView white = (TextView) activity.findViewById(R.id.white_text_view_hint); assertThat(white.getHint().toString()).isEqualTo("White Hint"); assertThat(white.getCurrentHintTextColor()).isEqualTo(activity.getResources().getColor(android.R.color.white)); TextView grey = (TextView) activity.findViewById(R.id.grey_text_view_hint); assertThat(grey.getHint().toString()).isEqualTo("Grey Hint"); assertThat(grey.getCurrentHintTextColor()).isEqualTo(activity.getResources().getColor(R.color.grey42)); }
new ColorDrawable(view.getCurrentTextColor()))); attributes.add(new ViewAttribute<>("HintColor", new ColorValue(view.getCurrentHintTextColor()), new ColorDrawable(view.getCurrentHintTextColor()))); attributes.add(new ViewAttribute<>("Typeface", view.getTypeface())); attributes.add(new ViewAttribute<>("TextSize",
public S hasCurrentHintTextColor(int color) { isNotNull(); int actualColor = actual.getCurrentHintTextColor(); assertThat(actualColor) // .overridingErrorMessage("Expected current hint text color <%s> but was <%s>.", Integer.toHexString(color), Integer.toHexString(actualColor)) // .isEqualTo(color); return myself; }
TextView text=new TextView(this); text.getCurrentHintTextColor(); text.getCurrentTextColor(); text.getDrawingCacheBackgroundColor();
values.put("TextSize", tv.getTextSize()); values.put("TextColor", getStringColor(tv.getCurrentTextColor())); values.put("HintTextColor", getStringColor(tv.getCurrentHintTextColor())); values.put("LinksClickable", tv.getLinksClickable()); values.put("MovementMethod", String.valueOf(tv.getMovementMethod()));