我想更改autoCompleteTextVIEw样式
像android.support.v7.internal.Widget.TintEditText中的样式
我在style.xml中添加了样式:
<style name="Apptheme" parent="Apptheme.Base"/><style name="Apptheme.Base" parent="theme.AppCompat"> <item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="androID:autoCompleteTextVIEwStyle">@style/autoCompleteTextVIEwApptheme</item></style><style name="autoCompleteTextVIEwApptheme" parent="Base.Widget.AppCompat.EditText"/>
这有效,但线条颜色不会改变.
具有材质设计的EditTexts似乎使用colorControlActivated和colorControlnormal.因此,我试图在先前的样式定义中覆盖这些属性,但它没有任何效果.
我需要做什么才能让它发挥作用?
<VIEw.../>
如果这不起作用,你可以尝试自己设计.
您必须更改可以查找的TextVIEw属性here.
可以通过更改应添加到样式中的androID:textcolor属性来更改实例的Textcolor,例如:
<style name="autoCompleteTextVIEwApptheme" parent="Base.Widget.AppCompat.EditText"/><item name="androID:textcolor">#ffffffff</item></style>
如果要更改edittext行,则必须更改背景属性,例如以这种方式:
<item name ="androID:background="@drawable/line_background"> </item>
并在drawables文件夹中添加一个具有类似内容的新文件line_background.xml:
<?xml version="1.0" enCoding="utf-8"?><shape xmlns:androID="http://schemas.androID.com/apk/res/androID" androID:shape="line"> <stroke androID:color="#c0c000" androID:wIDth="3dp"></stroke></shape>总结
以上是内存溢出为你收集整理的android – 使用AppCompat.EditText设置AutoCompleteTextView样式不起作用全部内容,希望文章能够帮你解决android – 使用AppCompat.EditText设置AutoCompleteTextView样式不起作用所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)