Advertisement
Shishu

xml file of relative layout

Dec 6th, 2019
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 1.92 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3.    xmlns:app="http://schemas.android.com/apk/res-auto"
  4.    xmlns:tools="http://schemas.android.com/tools"
  5.    android:layout_width="match_parent"
  6.    android:layout_height="match_parent"
  7.    tools:context=".MainActivity">
  8.  
  9.     <TextView
  10.        android:layout_width="match_parent"
  11.        android:layout_height="wrap_content"
  12.        android:text="Log In "
  13.        android:id="@+id/t1"
  14.        android:gravity="center"
  15.        android:textSize="30dp" />
  16.     <TextView
  17.        android:layout_width="wrap_content"
  18.        android:layout_height="wrap_content"
  19.        android:text="username "
  20.        android:id="@+id/t2"
  21.        android:gravity="center"
  22.        android:layout_below="@+id/t1"
  23.        android:textSize="100px" />
  24.  
  25.     <EditText
  26.        android:layout_width="match_parent"
  27.        android:layout_height="wrap_content"
  28.        android:id="@+id/t3"
  29.        android:gravity="center"
  30.        android:layout_below="@+id/t1"
  31.        android:layout_toRightOf="@+id/t2" />
  32.  
  33.     <TextView
  34.        android:layout_width="wrap_content"
  35.        android:layout_height="wrap_content"
  36.        android:text="password "
  37.        android:id="@+id/t4"
  38.        android:gravity="center"
  39.        android:layout_below="@+id/t2"
  40.        android:textSize="100px" />
  41.  
  42.     <EditText
  43.        android:layout_width="match_parent"
  44.        android:layout_height="wrap_content"
  45.        android:id="@+id/t5"
  46.        android:gravity="center"
  47.        android:layout_below="@+id/t3"
  48.        android:layout_toRightOf="@+id/t4" />
  49.  
  50.     <Button
  51.        android:id="@+id/b1"
  52.        android:layout_width="wrap_content"
  53.        android:layout_height="wrap_content"
  54.        android:layout_below="@+id/t5"
  55.        android:gravity="center"
  56.        android:layout_toEndOf="@id/t4"
  57.        android:text="Login" />
  58. </RelativeLayout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement