Set a consistent style to all EditText (for e.g.)

Override the attribute pointing to the EditText style(named editTextStyle 🙂 ) in your custom theme:

<style name="App_Theme" parent="@android:style/Theme.Holo">
   <item name="android:editTextStyle">@style/App_EditTextStyle</item>
</style>

and make your custom style to extend Widget.EditText:

<style name="App_EditTextStyle" parent="@android:style/Widget.EditText">
    <item name="android:background">@drawable/filled_roundededges_box_dark</item>
    <item name="android:textColor">#808080</item>
    <item name="android:layout_height">45dip</item>
</style>

Edit:

If you’re using the much newer AppCompat related themes use the editTextStyle attribute without the android prefix:

<style name="App_Theme" parent="Theme.AppCompat.Light.DarkActionBar">
        <item name="editTextStyle">@style/App_EditTextStyle</item>
</style>

Leave a Comment