登录XML

<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">
<!-- padding 内边距 layout_margin 外边距
android:layout_alignParentTop 布局的位置是否处于顶部 -->

<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" >
<!-- 账号 -->

<TextView
android:id="@+id/login_user_input"
style="@style/AppTheme"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_marginTop="5dp"
android:text="@string/sfzh" />

<EditText
android:id="@+id/username_edit"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/login_user_input"
android:hint="@string/login_username_hint"
android:inputType="text"
android:singleLine="true"
android:text="@string/srsf" />

<!-- 密码 text -->

<TextView
android:id="@+id/login_password_input"
style="@style/AppTheme"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/username_edit"
android:layout_marginTop="3dp"
android:text="@string/pass" />

<EditText
android:id="@+id/password_edit"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/login_password_input"
android:inputType="textPassword"
android:singleLine="true" />

<!-- 登录button -->

<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignRight="@id/password_edit"
android:layout_below="@id/password_edit"
android:text="@string/btnLogin" />

</RelativeLayout>

<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content" >

<TextView
android:id="@+id/register_link"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:text="@string/RegL"
android:textColor="#888"
android:textColorLink="#FF0066CC" />

</RelativeLayout>
</LinearLayout>

posted @ 2015-01-19 21:48  新瑞腾达  阅读(278)  评论(0编辑  收藏  举报