How to change the border color(un-focused) of an EditText?

Create a XML file with the following in drawable (say backwithborder.xml):

<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">
    <solid android:color="#00000000" />
    <stroke android:width="1dip" android:color="#ffffff" />
</shape>

and for the EditText user attribute android:background="@drawable/backwithborder"


To set the background of edittext to transparent you can use following :

android:background="@null"

See following links

Android EditText Transparent Background

setting the background attribute to transparent in editext dynamically

Overriding onDraw() for an EditText widget with a blank implementation has no effect

http://www.androidworks.com/changing-the-android-edittext-ui-widget


Android OS itself adds border to EditText when user focus on it. The color depends on the OS version. Sometimes we might want to get rid of default focus border and there is a way to do it.

We can keep the background color as transparent to remove the EditText border on focus.

     <EditText 
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
         android:background="#00000000"
      />