我正在尝试为我的Android应用程序编写新的自定义样式.我需要给风格ERRORTEXT其设置后出现setError在EditText.
我该如何定制它的风格?
例如:我想在style.xml中设置background白色和textColor:蓝色等

我想要做的是更改使用setError()方法后显示的弹出错误消息的背景颜色(设置自定义drawable).
目前,它看起来像这样:

我发现Android有两个文件:
popup_inline_error.9.pngpopup_inline_above_error.9.png你应该能够使用两个属性设置它们:
errorMessageBackgrounderrorMessageAboveBackground但是当我尝试在我的主题中设置它们时,我得到的只是:
<item name="errorMessageBackground">@drawable/popup_inline_error_holo_light</item>
<item name="errorMessageAboveBackground">@drawable/popup_inline_error_above_holo_light</item>
error: Error: No resource found that matches the given name: attr 'errorMessageBackground'.
Run Code Online (Sandbox Code Playgroud)
(它是一样的with android:errorMessageBackground)
我在这里提出这个问题,因为我的想法已经用完了 - 也许有人已经设法做到了这一点?
编辑: 我正在使用的主题的标题:
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style
name="Theme.MyThemeName"
parent="@style/Theme.Sherlock.Light">
Run Code Online (Sandbox Code Playgroud)
另一个编辑: 呃,我发现我的问题是一个副本: android:errorMessageBackground在styles.xml中找不到资源发现错误
是另一个编辑:这是一个已知问题,请看一下这个链接:https://code.google.com/p/android/issues/detail?id = 55879