I am trying to create a material view EditText:
<style name="AppTheme.EditText" parent="@style/Widget.AppCompat.EditText">
<item name="android:textColor">@color/white</item>
<item name="android:textColorHint">#8AFFFFFF</item>
<item name="colorControlNormal">@color/white</item>
<item name="colorControlActivated">@color/white</item>
<item name="colorControlHighlight">@color/white</item>
</style>
Then I apply the style to my theme:
<style name="AppTheme">
<item name="editTextStyle">@style/AppTheme.EditText</item>
</style>
And apply the theme to the activity:
<activity
android:name=".MyActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:windowSoftInputMode="stateAlwaysHidden"
android:theme="@style/AppTheme">
However, this does not change the color of the underline.
I know that I can change the accentColor to change the underline color, but I don't want to do this, because for some other controls my accent color will be different.
Can I adjust the underline color of the control as follows?
source
share