码迷,mamicode.com
首页 > 其他好文 > 详细

登录XML

时间:2015-01-19 22:34:41      阅读:167      评论:0      收藏:0      [点我收藏+]

标签:

<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>

登录XML

标签:

原文地址:http://www.cnblogs.com/xrtd/p/4234845.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!