Home | History | Annotate | Download | only in layout
      1 <?xml version="1.0" encoding="utf-8"?>
      2 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      3     xmlns:tools="http://schemas.android.com/tools"
      4     android:layout_width="match_parent"
      5     android:layout_height="match_parent"
      6     tools:context=".SimpleActivity" >
      7 
      8     <TextView
      9         android:id="@+id/View1"
     10         android:layout_width="wrap_content"
     11         android:layout_height="wrap_content"
     12         android:layout_marginTop="20dp"
     13         android:layout_alignParentTop="true"
     14         android:layout_centerHorizontal="true"
     15         android:text="@string/login"
     16         android:textAppearance="?android:attr/textAppearanceLarge" />
     17 
     18     <TextView
     19         android:id="@+id/View2"
     20         android:layout_width="wrap_content"
     21         android:layout_height="wrap_content"
     22         android:layout_alignParentStart="true"
     23         android:layout_below="@+id/View1"
     24         android:layout_marginTop="52dp"
     25         android:text="@string/user"
     26         android:textAppearance="?android:attr/textAppearanceMedium" />
     27 
     28     <EditText
     29         android:id="@+id/Text1"
     30         android:layout_width="wrap_content"
     31         android:layout_height="wrap_content"
     32         android:layout_alignBottom="@+id/View2"
     33         android:layout_marginStart="34dp"
     34         android:layout_toEndOf="@+id/View2"
     35         android:ems="14" >
     36 
     37         <requestFocus />
     38     </EditText>
     39 
     40     <TextView
     41         android:id="@+id/View3"
     42         android:layout_width="wrap_content"
     43         android:layout_height="wrap_content"
     44         android:layout_alignStart="@+id/View2"
     45         android:layout_below="@+id/View2"
     46         android:layout_marginTop="40dp"
     47         android:text="@string/pass"
     48         android:textAppearance="?android:attr/textAppearanceMedium" />
     49 
     50     <EditText
     51         android:id="@+id/Text2"
     52         android:layout_width="wrap_content"
     53         android:layout_height="wrap_content"
     54         android:layout_alignBottom="@+id/View3"
     55         android:layout_alignStart="@+id/Text1"
     56         android:ems="14"
     57         android:inputType="textPassword" />
     58 
     59     <Button
     60         android:id="@+id/button1"
     61         android:layout_width="wrap_content"
     62         android:layout_height="wrap_content"
     63         android:layout_centerHorizontal="true"
     64         android:layout_marginTop="99dp"
     65         android:layout_below="@+id/Text2"
     66         android:onClick="login"
     67         android:text="@string/Login" />
     68 
     69 </RelativeLayout>