我做材料的設計風格應用造型AutoCompleteTextView與AppCompat.EditText不起作用
我想
改變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"/>
雖然有效,但線條顏色不變。
帶材料設計的EditText似乎使用colorControlActivated
和colorControlNormal
。因此,我試圖在先前的樣式定義中覆蓋這些屬性,但它沒有效果。
我需要做什麼,使其工作?
文字顏色屬性適用處理
popupBackground
屬性的類,但問題是,我不能改變線條顏色(它在屏幕上是黑色的) – CodeNinja看我最近的編輯 –
這只是通過中間畫一條線。它不會執行材質下劃線。 – radley