--------------------------------------------------------------------
Java code
<? 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">
<! --
Padding layout_margin margin android: layout_alignParentTop
Whether the layout is on the top
-->
<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">
<! -- Account -->
<TextView android: id = "@ + id/login_user_input"
Android: layout_width = "wrap_content" android: layout_height = "wrap_content"
Android: layout_alignParentTop = "true" android: layout_marginTop = "5dp"
Android: text = "@ string/login_label_username" style = "@ style/normalText"/>
<EditText android: id = "@ + id/username_edit"
Android: layout_width = "fill_parent" android: layout_height = "wrap_content"
Android: hint = "@ string/login_username_hint" android: layout_below = "@ id/login_user_input"
Android: singleLine = "true" android: inputType = "text"/>
<! -- Password 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"/>
<! -- Log on to the button -->
<Button android: id = "@ + id/loginbutton" 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"
Android: background = "@ drawable/blue_button"/>
</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"/>
<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"/>
<ImageView android: src = "@ drawable/logo"
Android: layout_width = "wrap_content" android: layout_height = "wrap_content"
Android: layout_toLeftOf = "@ id/miniTwitter_logo"
Android: layout_alignBottom = "@ id/miniTwitter_logo"
Android: paddingBottom = "8dp"/>
</RelativeLayout>
</LinearLayout>
Author: "Android Development"