相關閱讀:Android拍照上傳程序的Servlet程序樣例 http://www.linuxidc.com/Linux/2011-11/47619.htm
1. login_window.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="@drawable/bg_logo"
- >
-
- <TextView android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginLeft="20dip"
- android:layout_marginRight="20dip"
- android:text="@string/user_name"
- />
- <EditText
- android:id="@+id/username"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_marginLeft="20dip"
- android:layout_marginRight="20dip"
- android:scrollHorizontally="true"
- android:autoText="false"
- android:text="user"
- android:capitalize="none"
- android:gravity="fill_horizontal"
- android:textAppearance="?android:attr/textAppearanceMedium"
- />
-
- <TextView android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginLeft="20dip"
- android:layout_marginRight="20dip"
- android:text="@string/user_passwd" />
-
- <EditText android:id="@+id/userpasswd"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_marginLeft="20dip"
- android:layout_marginRight="20dip"
- android:scrollHorizontally="true"
- android:autoText="false"
- android:text="user"
- android:capitalize="none"
- android:gravity="fill_horizontal"
- android:password="true"
- android:textAppearance="?android:attr/textAppearanceMedium" />
-
- <CheckBox android:id="@+id/cbx_cmwap"
- android:text="CMWAP"
- android:checked="false"
- android:layout_marginLeft="20dip"
- android:layout_marginRight="20dip"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content" />
-
- <RelativeLayout android:orientation="horizontal"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content">
-
- <Button android:id="@+id/login_button"
- android:text="LOGIN"
- android:layout_marginLeft="20dip"
- android:layout_marginRight="20dip"
- android:layout_alignParentRight="true"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content" />
-
- <Button android:id="@+id/exit_button"
- android:text="EXIT"
- android:layout_marginLeft="20dip"
- android:layout_marginRight="20dip"
- android:layout_toLeftOf="@id/login_button"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content" />
-
- </RelativeLayout>
-
- </LinearLayout>
2. func_selector.xml
- <?xml version="1.0" encoding="utf-8"?>
-
- <GridView xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/func_selector"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:numColumns="auto_fit"
- android:verticalSpacing="10dp"
- android:horizontalSpacing="10dp"
- android:columnWidth="90dp"
- android:stretchMode="columnWidth"
- android:gravity="center"
- android:background="@drawable/bg_logo"
- />