android 手機登入介面程式1(轉載+修改)

來源:互聯網
上載者:User

(2011-10-06 19:56:08)

一個普通登入介面的代碼,主要是三個EditText,一個checkBox,兩個button

<?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=" @drawable/background_login"><TextView  android:id=" @+id/login_user_num"  android:layout_width=" wrap_content"  android:layout_height=" wrap_content"  android:textSize=" 25px"  android:layout_marginLeft=" 40px"  android:textStyle=" bold"  android:text=" 移動物流手機用戶端"  android:textColor=" #000000"  style=" @style/normalText" /> <RelativeLayout  android:id=" @+id/login_div"  android:layout_width=" fill_parent"  android:layout_height=" wrap_content"  android:padding=" 15dip"  android:layout_margin=" 15dip"  android:background=" @drawable/background_login_div_bg"><TextView  android:id=" @+id/login_user_num"  android:layout_width=" wrap_content"  android:layout_height=" wrap_content"  android:text=" 工號" style=" @style/normalText" /><EditText  android:id=" @+id/usernum_edit"  android:layout_width=" fill_parent"  android:layout_height=" wrap_content"  android:layout_below=" @id/login_user_num"  android:hint=" @string/login_work_num_hint"  android:singleLine=" true"  android:inputType=" text" /><TextView  android:id=" @+id/login_user_input"  android:layout_width=" wrap_content"  android:layout_height=" wrap_content"  android:layout_below=" @id/usernum_edit"  android:text=" @string/login_label_userID_num"  style=" @style/normalText" /><EditText  android:id=" @+id/username_edit"  android:layout_width=" fill_parent"  android:layout_height=" wrap_content"  android:hint=" @string/login_userID_num_hint"  android:layout_below=" @id/login_user_input"  android:singleLine=" true"  android:inputType=" text" /><TextView  android:id=" @+id/login_password_input"  android:layout_width=" wrap_content"  android:layout_height=" wrap_content"  android:layout_below=" @id/username_edit"  android:layout_marginTop=" 3dp"  android:text=" @string/login_label_password"  style=" @style/normalText" /><EditText  android:id=" @+id/password_edit"  android:layout_width=" fill_parent"  android:layout_height=" wrap_content"  android:layout_below=" @id/login_password_input"  android:password=" true"  android:singleLine=" true"  android:inputType=" textPassword" /><CheckBox  android:id=" @+id/cbRemember"  android:text=" @string/cbRemember"  android:layout_gravity=" center_horizontal"  android:checked=" false"  android:textColor=" @color/character"  android:layout_width=" wrap_content"  android:layout_height=" wrap_content"  android:layout_below=" @id/password_edit" /><Button  android:id=" @+id/signin_button"  android:layout_width=" wrap_content"  android:layout_height=" wrap_content"  android:layout_below=" @id/password_edit"  android:layout_alignRight=" @id/password_edit"  android:text=" @string/login_label_signin" /></RelativeLayout> <RelativeLayout  android:layout_width=" fill_parent"  android:layout_height=" wrap_content"><TextView  android:id=" @+id/register_link"  android:text=" @string/login_register_link"  android:layout_width=" wrap_content"  android:layout_height=" wrap_content"  android:layout_marginLeft=" 15dp"  android:textColor=" #888"  android:textColorLink=" #FF0066CC" /><Button  android:id=" @+id/register_button"  android:layout_toRightOf=" @id/register_link"  android:layout_width=" wrap_content"  android:layout_height=" wrap_content"  android:layout_alignTop=" @id/register_link"  android:text=" 註冊" /><ImageView  android:id=" @+id/miniTwitter_logo"  android:src=" @drawable/cat"  android:layout_width=" wrap_content"  android:layout_height=" wrap_content"  android:layout_alignParentRight=" true"  android:layout_alignParentBottom=" true"  android:layout_marginRight=" 25dp"  android:layout_marginLeft=" 10dp"  android:layout_marginBottom=" 25dp" /></RelativeLayout></LinearLayout>如下:

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.