Advertisement
Guest User

Android layout 2013-08-07

a guest
Aug 7th, 2013
421
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 1.09 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!-- TextView1 alignParentTop.   Button2 alignParentBottom.   Button1 above button2. -->
  3. <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  4.    android:id="@+id/layout1"
  5.    android:layout_width = "match_parent"
  6.    android:layout_height = "match_parent">
  7.  
  8.     <TextView
  9.        android:id = "@+id/textView1"
  10.        android:layout_width = "match_parent"
  11.        android:layout_height = "wrap_content"
  12.        android:text = "TextView1.  "
  13.        android:layout_alignParentTop ="true" />
  14.  
  15.     <Button
  16.        android:id = "@+id/button2"
  17.        android:layout_width = "match_parent"
  18.        android:layout_height = "60dp"
  19.        android:text = "Button2"
  20.        android:layout_alignParentBottom = "true"
  21.        android:onClick = "onClick" />
  22.  
  23.     <Button
  24.         android:id = "@+id/button1"
  25.         android:layout_width = "match_parent"
  26.         android:layout_height = "60dp"
  27.         android:text = "Button1"
  28.         android:layout_above = "@+id/button2"
  29.         android:onClick = "onClick" />
  30.  
  31. </RelativeLayout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement