android搞的一個登錄界面


還是先上傳圖片把。設計的很丑,臟了大家的眼球了。實現的基本需求,沒有詳細的設計高度,寬度什么的。還沒添加驗證功能,待完善。

 

代碼如下:

<?xml version="1.0" encoding="utf-8"?>
    <TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent" 
        android:orientation="vertical"
        >

        <TableRow
            android:id="@+id/tableRow1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" >

            <TextView
                android:id="@+id/textView1"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="TextView" />
            <EditText 
                android:layout_width="fill_parent"
				android:layout_height="wrap_content"
				android:hint="請填寫登陸賬號"
				android:selectAllOnFocus="true"        
                />
        </TableRow>

        <TableRow
            android:id="@+id/tableRow2"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" >

            <TextView
                android:id="@+id/textView2"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="密碼" 
                android:textSize="10pt"
                android:background="@drawable/image"
                />
		<EditText 
		    android:layout_width="fill_parent"
		    android:layout_height="wrap_content"
		    android:password="true"
		    />
        </TableRow>

        <TableRow
            android:id="@+id/tableRow3"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" >

            <TextView
                android:id="@+id/textView3"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:text="電話號碼"
                android:textSize="10pt"
                android:background="@drawable/image"
                 />
            <EditText 
                android:layout_height="wrap_content"
                android:layout_width="fill_parent"
                android:hint="請輸入您的電話號碼"
                android:selectAllOnFocus="true"
                android:phoneNumber="true"
                />
        </TableRow>

        <Button
            android:id="@+id/button1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="注冊" />
		
    </TableLayout>

  


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM