Advertisement
rachmadi

Layout Segi Empat

Jul 13th, 2016
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.80 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <RelativeLayout
  3.     xmlns:android="http://schemas.android.com/apk/res/android"
  4.     xmlns:tools="http://schemas.android.com/tools"
  5.     android:layout_width="match_parent"
  6.     android:layout_height="match_parent"
  7.     android:paddingLeft="@dimen/activity_horizontal_margin"
  8.     android:paddingRight="@dimen/activity_horizontal_margin"
  9.     android:paddingTop="@dimen/activity_vertical_margin"
  10.     android:paddingBottom="@dimen/activity_vertical_margin"
  11.     tools:context="com.training.android.segiempat.MainActivity">
  12.  
  13.     <EditText
  14.         android:id="@+id/etPanjang"
  15.         android:layout_width="match_parent"
  16.         android:layout_height="wrap_content"
  17.         android:hint="Panjang"/>
  18.     <EditText
  19.         android:id="@+id/etLebar"
  20.         android:layout_width="match_parent"
  21.         android:layout_height="wrap_content"
  22.         android:hint="Lebar"
  23.         android:layout_below="@+id/etPanjang"/>
  24.     <LinearLayout
  25.         android:id="@+id/llLuas"
  26.         android:layout_width="match_parent"
  27.         android:layout_height="wrap_content"
  28.         android:orientation="horizontal"
  29.         android:padding="5dp"
  30.         android:layout_below="@+id/etLebar">
  31.         <TextView
  32.             android:id="@+id/tvLabelLuas"
  33.             android:layout_width="1dp"
  34.             android:layout_weight="6"
  35.             android:textSize="18sp"
  36.             android:layout_height="wrap_content"
  37.             android:text="Luas: "/>
  38.         <TextView
  39.             android:id="@+id/tvLuas"
  40.             android:layout_width="1dp"
  41.             android:layout_weight="1"
  42.             android:textSize="18sp"
  43.             android:layout_height="wrap_content"
  44.             android:text="0"/>
  45.     </LinearLayout>
  46.     <LinearLayout
  47.         android:id="@+id/llKeliling"
  48.         android:layout_width="match_parent"
  49.         android:layout_height="wrap_content"
  50.         android:orientation="horizontal"
  51.         android:padding="5dp"
  52.         android:layout_below="@+id/llLuas">
  53.         <TextView
  54.             android:id="@+id/tvLabelKeliling"
  55.             android:layout_width="1dp"
  56.             android:layout_weight="6"
  57.             android:textSize="18sp"
  58.             android:layout_height="wrap_content"
  59.             android:text="Keliling: "/>
  60.         <TextView
  61.             android:id="@+id/tvKeliling"
  62.             android:layout_width="1dp"
  63.             android:layout_weight="1"
  64.             android:textSize="18sp"
  65.             android:layout_height="wrap_content"
  66.             android:text="0"/>
  67.     </LinearLayout>
  68.     <Button
  69.         android:id="@+id/btnHitung"
  70.         android:layout_width="match_parent"
  71.         android:layout_height="wrap_content"
  72.         android:text="Hitung"
  73.         android:layout_below="@+id/llKeliling"
  74.         android:layout_marginTop="10dp"/>
  75. </RelativeLayout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement