2012-11-08 30 views
0

有誰知道如何用彎曲的編輯文本在Android上創建登錄表單?Android登錄表單UI

例如像IOS:

img

是否有良好的UI教程?

回答

2

只需創建一個可繪製資源,指定的EditText將繪製方式:

<?xml version="1.0" encoding="utf-8"?> 
<!-- res/drawable/rounded_edittext.xml --> 
<shape xmlns:android="http://schemas.android.com/apk/res/android" 
android:shape="rectangle" android:padding="10dp"> 
<solid android:color="#FFFFFF"/> 
<corners 
android:bottomRightRadius="15dp" 
android:bottomLeftRadius="15dp" 
android:topLeftRadius="15dp" 
android:topRightRadius="15dp"/> 
</shape> 

然後,就引用該繪製在佈局:

<?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" 
> 
<EditText 
android:layout_width="fill_parent" 
android:layout_height="wrap_content" 
android:padding="5dip" 
android:background="@drawable/rounded_edittext" /> 
</LinearLayout>