今天写代码,要edittext为空的时候给出提示,用android自带的setError函数,发现文本的颜色和背景的颜色相同,查了一下资料,贴出solution:


在  res/values/styles.xml文件中,在自定义主题里加入一个item:

 @android:color/primary_text_light

完整文件内容如下:

                            

这样,提示的内容颜色会变为黑色

还不知道怎样改popup的背景颜色,不喜欢默认的白色。

贴上源网址(英文)

https://code.google.com/p/android/issues/detail?id=10378&q=setError&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars

更多相关文章

  1. 设置提示信息,输入值类型,输入框引入图片,设置输入框的形状
  2. Android ListView 去除边缘阴影、选中色、拖动背景色等(转)
  3. Android消息提示框Toast
  4. android背景选择器selector用法、自定义Button按钮样式
  5. Android仿百度谷歌自动提示——AutoCompleteTextView
  6. [整] Android ListView 去除边缘阴影、选中色、拖动背景色等
  7. android TextView字体颜色根据焦点点击变化
  8. android为文本框设置背景资源-shape
  9. android获取图片的RGB颜色值

随机推荐

  1. Android(安卓)PK ios,是谁胜谁负
  2. Android之在GEC210板上点灯。
  3. 基于android和arduino 的小车控制
  4. Android(安卓)Activity间数据传输
  5. android listview 数据加载错乱、错位、
  6. 移植 android, touch screen 不能正常工
  7. VisionMobile:2015年Android使用的全球趋
  8. android android:windowSoftInputMode相
  9. 乐博Android客户端(新浪微博)1.01发布,欢迎
  10. 9、从头学Android之Button和ImageButton