To control the shape of the border, first build an XML file in drawable: Shape.xml
1<?xml version="1.0"encoding="Utf-8"?>2<shape xmlns:android="http://schemas.android.com/apk/res/android">3<solid android:color="#00ff00ff"/>4<corners android:radius="8px"/>5<stroke android:color="#32CD32" 6Android:width="2px" 7/>8</shape>
Then the layout file, you can control the EditText icon, font color, cursor, hint font
1<?xml version="1.0"encoding="Utf-8"?>2<linearlayout xmlns:android="http://schemas.android.com/apk/res/android" 3Android:layout_width="fill_parent" 4android:layout_height="fill_parent" 5Android:background="@drawable/BG" 6android:orientation="Vertical">7 8 9<EditTextTenAndroid:layout_width="200DP" Oneandroid:layout_height="wrap_content" Aandroid:layout_gravity="Center" -android:drawableleft="@drawable/title" //in-box icons -Android:background="@drawable/shape" //Border Shape theandroid:padding="5px" -Android:hint="Please enter user name" -Android:singleline="true" -android:textcursordrawable="@null" //cursor Color +Android:textcolor="#4e4d4d"/> - +</LinearLayout> A
Android EditText setting cursors, borders, and icons