android.widget.TextView.getCurrentHintTextColor()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(2.9k)|赞(0)|评价(0)|浏览(97)

本文整理了Java中android.widget.TextView.getCurrentHintTextColor()方法的一些代码示例,展示了TextView.getCurrentHintTextColor()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TextView.getCurrentHintTextColor()方法的具体详情如下:
包路径:android.widget.TextView
类名称:TextView
方法名:getCurrentHintTextColor

TextView.getCurrentHintTextColor介绍

暂无

代码示例

代码示例来源:origin: square/assertj-android

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;
}

代码示例来源:origin: robolectric/robolectric

@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));
}

代码示例来源:origin: willowtreeapps/Hyperion-Android

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",

代码示例来源:origin: com.squareup.assertj/assertj-android

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;
}

代码示例来源:origin: stackoverflow.com

TextView text=new TextView(this);
 text.getCurrentHintTextColor();
 text.getCurrentTextColor();
 text.getDrawingCacheBackgroundColor();

代码示例来源:origin: jbruchanov/AnUitor

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()));

相关文章

微信公众号

最新文章

更多

TextView类方法