This is the default method that looks like EditText when I create it:

Here's what it looks like after changing the background:

To change the background to the image above, I will add the following EditText property to my EditText in the XML file:
android:background="@android:drawable/edit_text"
I want to do what I did above in my activity class (giving the user the option to choose between classic style and transparent / new style).
So, I need people to fill in /*...*/
if (classicTextbox()) { // the blocky white one editText.setTextColor(Color.BLACK); editText.setBackgroundResource(android.R.drawable.edit_text); } else { // the new transparent one editText.setTextColor(Color.WHITE); editText.setBackgroundResource(/*...*/); }
So, how do I change it to a new, transparent EditText style?
source share