Relative Layout di Android Studio
hello temen2
yuk kita belajar bagaimana membuat relative layout di android studio
dengan langsung membuat button...
yuk lihat kodingannya
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/ini_button"
android:text="INI BUTTON"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="INI BUTTON KIRI"
android:layout_below="@id/ini_button"
android:layout_alignParentLeft="true"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="INI BUTTON KANAN"
android:layout_below="@id/ini_button"
android:layout_alignParentRight="true"/>
</RelativeLayout>
bila sudah maka akan tampil tombol dengan layout relative seperti ini..
Komentar
Posting Komentar