To change the underline color of Edittexts:
If you want the whole app to share this style, you can take the next path.
(1) go to styles.xml file. Your AppTheme, which inherits the parent of Theme.AppCompat.Light.DarkActionBar (in my case), will be the main parent of all the style files for your application. Change its name to "AppBaseTheme". Make another style under it that has the name AppTheme and inherits from the AppBaseTheme that you just edited. It will look like this:
<style name="AppBaseTheme" parent="Theme.AppCompat.Light.DarkActionBar"> <item name="windowActionBar">false</item> <item name="colorPrimary">@color/material_brown_500</item> <item name="colorPrimaryDark">@color/material_brown_700</item> <item name="colorAccent">@color/flamingo</item> <style name="AppTheme" parent="AppBaseTheme"> </style>
Then change the “colorAccent” to whatever color you want with the color of the EditText line.
(2) If you have other folders with style.xml options, this step is very important. Since this file is inherited from your previous parent xml file. For example, I have values -19 / styles.xml. This is specifically for Kitkat and above. Change the parent to AppBaseTheme and make sure that you get rid of "colorAccent" so that it does not override the color of the parents. You also need to save the elements specific to version 19. Then it will look like this.
<resources> <style name="AppTheme" parent="AppBaseTheme"> <item name="android:windowTranslucentStatus">true</item> </style> </resources>
Suhyun Kim May 01 '15 at 3:12 p.m. 2015-05-01 15:12
source share