Android: Edit Text border line

To add border line to EditText, we have to set background drawable to EditText.
Below code, we have to keep it in drawable folder.


<?xml version="1.0" encoding="UTF-8" ?> 

<shape xmlns:android=""> 
           <solid android:color="#ffffff" /> 
           <stroke android:width="3dp" android:color="#000000" /> 
           <padding android:left="2dp" android:top="2dp" android:right="2dp"                   android:bottom="2dp" /> 

We need to set above file to EditText view to show borderline.

             android:hint="Write message here..."
             android:textSize="14dip" />

No comments:

Post a Comment