我使用AppCompatEditText我的佈局是EDITTEXT變線顏色和文本顏色不同
<android.support.design.widget.TextInputLayout
android:id="@+id/text_input_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.app.dream11.UI.CustomEditTextView
android:id="@+id/edit_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Enter your name"
CustomEditTextView:fontType="Xanadu" />
</android.support.design.widget.TextInputLayout>
風格我已經定義爲
<style name="Widget.Design.TextInputLayout" parent="AppTheme">
<item name="hintTextAppearance">@style/AppTheme.TextFloatLabelAppearance</item>
<item name="errorTextAppearance">@style/AppTheme.TextErrorAppearance</item>
<item name="counterTextAppearance">@style/TextAppearance.Design.Counter</item>
<item name="counterOverflowTextAppearance">@style/TextAppearance.Design.Counter.Overflow
</item>
</style>
<style name="AppTheme.TextFloatLabelAppearance" parent="TextAppearance.Design.Hint">
<!-- Floating label appearance here -->
<item name="android:textColor">@color/warm_grey_two</item>
</style>
<style name="AppTheme.TextErrorAppearance" parent="TextAppearance.Design.Error">
<!-- Error message appearance here -->
<item name="android:textColor">@color/pale_red</item>
<item name="colorControlHighlight">@color/denim_blue</item>
</style>
<!-- edittext line color -->
<item name="colorControlNormal">@color/white_four</item>
<item name="colorControlActivated">@color/greyish_brown</item>
<item name="editTextStyle">@style/App_EditTextStyle</item> <!-- For compatibility with the support library -->
</style>
,但現在的問題是,當我設置edittext的線顏色說藍色,然後文字顏色也變成藍色但我想 線顏色守LD是不同的,文字顏色也不同
所以在我的情況,我有不同的顏色對主旋律初級 – andro
使用這種.......並根據需要對colorprimary和coloraccent –
的變線沒有得到你檢查我的代碼更改顏色 – andro