saggaf.arsyad
saggaf.arsyad

Reputation: 831

Android: Set EditText to Dark in Light

My app is set to Light theme and I've had a header which is set to Dark. Is it possible to make EditText inside the header to have a Dark style too in KitKat and before? It is working in Lollipop btw

Note: I don't have reputation to post image so here is the link to the image

enter image description here

Upvotes: 0

Views: 1015

Answers (2)

dilettante
dilettante

Reputation: 584

If you are using EditText (Require API >= 21)

android:backgroundTint="#FFF"

Or you can use android.support.v7.widget.AppCompatEditText

 app:backgroundTint="#FFF"

Remember to add

 xmlns:app="http://schemas.android.com/apk/res-auto"

to your root view

Upvotes: 0

Shubham
Shubham

Reputation: 165

In your .xml file, add these lines to the EditText element

android:background="#000000"
android:textColor="#ffffff"

Upvotes: 0

Related Questions