android tutorial - Styling EditText in Android Editext | Developer android - android app development - android studio - android app developement



  • Changing the edit text's appearance when it's selected, pressed and not selected can be customised easily by adding creating a new style for your edit text like so
<style name="EditTextTheme" parent="Theme.AppCompat.Light.DarkActionBar">
    <item name="colorControlNormal">@color/colorPrimary</item>
    <item name="colorControlActivated">@color/colorPrimaryDark</item>
    <item name="colorControlHighlight">@color/accent</item>
</style>
click below button to copy code from our android learning website - android tutorial - team
  • And then add this style to your EditText like
<EditText
    android:width="wrap_content"
    android:height="wrap_content"
    style="@style/EditTextTheme" />
click below button to copy code from our android learning website - android tutorial - team

Related Searches to Styling In EditText in Android Editext