Advertisement
apl-mhd

RelativeLayout

Jan 26th, 2018
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.17 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.     android:orientation="vertical"
  8.     android:layout_marginTop="10dp"
  9.     android:layout_marginLeft="5dp"
  10.     android:layout_marginRight="5dp"
  11.     tools:context="com.example.reaz.relativelayout.MainActivity">
  12.  
  13.     <Button
  14.         android:layout_width="wrap_content"
  15.         android:layout_height="wrap_content"
  16.         android:text="Button 1"
  17.         android:id="@+id/buone"
  18.         />
  19.  
  20.     <Button
  21.         android:layout_width="wrap_content"
  22.         android:layout_height="wrap_content"
  23.         android:id="@+id/butwo"
  24.         android:layout_below="@+id/buone"
  25.         android:text="butwo"
  26.  
  27.         />
  28.  
  29.     <Button
  30.         android:layout_width="wrap_content"
  31.         android:layout_height="wrap_content"
  32.         android:text="Button 3"
  33.         android:layout_toRightOf="@id/butwo"
  34.         android:layout_below="@id/buone"
  35.  
  36.         />
  37.  
  38. </RelativeLayout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement