【问题标题】:Change the color of the EditText in Android在 Android 中更改 EditText 的颜色
【发布时间】:2014-10-07 22:05:15
【问题描述】:

在Android中改变EditText的颜色

我试图更改用户在 EditText 中写入的颜色(在 Android 中)

我想把它改成白色,所以我想知道我是否应该在 XML 中这样做? 提前谢谢你:)

【问题讨论】:

  • 使用 android:textColor="#colorcode"
  • 使用edittext.setTextColor(Color.parseColor("#ffffff"));
  • 答案将在 4 分钟内得到验证

标签: java android xml text colors


【解决方案1】:

在您的 EditText 属性中。

android:textColor="#ffffff"

例如:

<EditText
        android:id="@+id/editText1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textColor="#ffffff"
        android:ems="10" >

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-09-12
    • 2014-11-08
    • 1970-01-01
    • 1970-01-01
    • 2016-11-29
    • 1970-01-01
    • 1970-01-01
    • 2017-11-25
    相关资源
    最近更新 更多