Set border fillets You can define an XML in the DRAWABLE-MDPI directory:
<?xml version= "1.0" encoding= "Utf-8"? ><shape xmlns:android= "Http://schemas.android.com/apk/res/android" > <solid android:color= "#000000"/> <corners android:topleftradius= "10DP" android: toprightradius= "10DP" android:bottomrightradius= "10DP" android:bottomleftradius= "10DP"/> </ Shape>
Explanation: Solid represents the fill color, in order to be simple, here is the black.
and the corners is the fillet, note that here Bottomrightradius is the lower left corner instead of the lower right corner, Bottomleftradius the lower right corner.
Of course, the above effect can also be set as below, as follows:
<corners android:radius= "5DP"/>
If you want to reference this XML, you need only @drawable/corners_bg.xml:
android:background= "@drawable/CORNERS_BG"
Last main.xml:
<?xml version= "1.0" encoding= "Utf-8"? ><linearlayout xmlns:android= "http://schemas.android.com/apk/res/ Android "android:orientation=" vertical "android:layout_width=" fill_parent "android:layout_height=" Fill_parent " Android:background= "#FFFFFF" ><relativelayout android:id= "@+id/login_div" android:layout_width= "fill_parent "Android:layout_height=" 150dip "android:padding=" 15dip "android:layout_margin=" 15dip "android:background=" @ DRAWABLE/CORNERS_BG "></RelativeLayout></LinearLayout>
Android for rounded border layout