I want to have a transparent background for Android EditText widget. How is that possible?
Put this property in edittext:
android:background="@null"
You can also set it using java code
myTextView.setBackgroundColor(Color.TRANSPARENT);
Use translucent theme
<activity android:theme="@android:style/Theme.Translucent">
in xml file you use this property:
android:background="@android:color/transparent"
and in java file run time in onCreate method use:
edittext.setBackgroundColor(Color.TRANSPARENT);
android:background="#00000000"
You can also do it programitically like this:
TypedValue value= new TypedValue();
getApplicationContext().getTheme().resolveAttribute(android.R.attr.selectableItemBackground, value, true);
myButton.setBackgroundResource(value.resourceId);