1<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 2 xmlns:tools="http://schemas.android.com/tools" 3 android:id="@+id/container" 4 android:layout_width="match_parent" 5 android:layout_height="match_parent" 6 tools:context=".LoginActivity" > 7 8 <TextView 9 android:id="@+id/password" 10 android:layout_width="wrap_content" 11 android:layout_height="wrap_content" 12 android:layout_alignRight="@+id/username" 13 android:layout_below="@+id/username" 14 android:layout_marginTop="30dp" 15 android:text="@string/password" 16 android:textAppearance="?android:attr/textAppearanceLarge" /> 17 18 <EditText 19 android:id="@+id/usernameEdit" 20 android:layout_width="wrap_content" 21 android:layout_height="wrap_content" 22 android:layout_alignTop="@+id/username" 23 android:layout_marginLeft="14dp" 24 android:layout_toRightOf="@+id/username" 25 android:ems="10" /> 26 27 <TextView 28 android:id="@+id/username" 29 android:layout_width="wrap_content" 30 android:layout_height="wrap_content" 31 android:layout_alignParentLeft="true" 32 android:layout_alignParentTop="true" 33 android:layout_marginLeft="20dp" 34 android:layout_marginTop="51dp" 35 android:text="@string/username" 36 android:textAppearance="?android:attr/textAppearanceLarge" /> 37 38 <EditText 39 android:id="@+id/passwordEdit" 40 android:layout_width="wrap_content" 41 android:layout_height="wrap_content" 42 android:layout_alignBaseline="@+id/password" 43 android:layout_alignBottom="@+id/password" 44 android:layout_alignLeft="@+id/usernameEdit" 45 android:layout_alignParentRight="true" 46 android:ems="10" > 47 48 <requestFocus /> 49 </EditText> 50 51 <Button 52 android:id="@+id/cancel" 53 android:layout_width="wrap_content" 54 android:layout_height="wrap_content" 55 android:layout_alignParentBottom="true" 56 android:layout_marginBottom="14dp" 57 android:layout_toLeftOf="@+id/passwordEdit" 58 android:onClick="sendMessage" 59 android:text="@string/cancel" /> 60 61 <Button 62 android:id="@+id/submit" 63 android:layout_width="wrap_content" 64 android:layout_height="wrap_content" 65 android:layout_alignBaseline="@+id/cancel" 66 android:layout_alignBottom="@+id/cancel" 67 android:layout_alignLeft="@+id/passwordEdit" 68 android:layout_marginLeft="41dp" 69 android:onClick="sendMessage" 70 android:text="@string/submit" /> 71 72 <TextView 73 android:id="@+id/newuser" 74 android:layout_width="wrap_content" 75 android:layout_height="wrap_content" 76 android:layout_below="@+id/passwordEdit" 77 android:layout_centerHorizontal="true" 78 android:layout_marginTop="16dp" 79 android:textColor="#0000ff" 80 android:text="@string/new_user" 81 android:clickable="true" 82 android:onClick="sendMessage" 83 android:textAppearance="?android:attr/textAppearanceMedium" 84 android:textStyle="italic" /> 85 86</RelativeLayout>