You are on page 1of 6

<LinearLayout xmlns:android="http://schemas.android.

com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/LinearLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/o"
android:orientation="vertical"
tools:context=".AyoBelajar" >

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >

<LinearLayout
android:id="@+id/LinearLayout2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="20dp"
android:paddingTop="135dp" >

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >

<Button
android:id="@+id/btnBabsatu"
android:layout_width="60dp"
android:layout_height="60dp"
android:background="@drawable/ballon"
android:text=" " />

<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:text="Bilangan Cacah"
android:textColor="#a43d0a"
android:textSize="15sp"
android:textStyle="bold" />

</LinearLayout>

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content" >

<TextView
android:id="@+id/TextView01"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_marginTop="15dp"
android:text="Penjumlahan dan Pengurangan"
android:textColor="#a43d0a"
android:textSize="15sp"
android:textStyle="bold" />
<Button
android:id="@+id/btnBabdua"
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_marginLeft="10dp"
android:layout_marginTop="3dp"
android:background="@drawable/balondua"
android:text=" " />

</LinearLayout>

</LinearLayout>

<LinearLayout
android:id="@+id/LinearLayout2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="20dp"
android:paddingTop="5dp" >

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >

<Button
android:id="@+id/btnBabtiga"
android:layout_width="60dp"
android:layout_height="60dp"
android:background="@drawable/balontiga"
android:text=" " />

<TextView
android:id="@+id/TextView02"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_marginLeft="10dp"
android:layout_marginTop="15dp"
android:paddingLeft="5dp"
android:text="Satuan Waktu dan Panjang"
android:textColor="#a43d0a"
android:textSize="15sp"
android:textStyle="bold" />

</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >

<TextView
android:id="@+id/TextView03"
android:layout_width="132dp"
android:layout_height="fill_parent"
android:layout_marginLeft="80dp"
android:layout_marginTop="15dp"
android:text="Bangun Ruang"
android:textColor="#a43d0a"
android:textSize="15sp"
android:textStyle="bold" />
<Button
android:id="@+id/btnBabempat"
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_marginLeft="5dp"
android:layout_marginTop="3dp"
android:background="@drawable/balonempat"
android:text=" " />

</LinearLayout>

</LinearLayout>
</LinearLayout>

</LinearLayout>
package com.matematika1sd;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class AyoBelajar extends Activity {


Button btnBabsatu;
Button btnBabdua;
Button btnBabtiga;
Button btnBabempat;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_ayo_belajar);
btnBabsatu=(Button)findViewById(R.id.btnBabsatu);
btnBabdua=(Button)findViewById(R.id.btnBabdua);
btnBabtiga=(Button)findViewById(R.id.btnBabtiga);
btnBabempat=(Button)findViewById(R.id.btnBabempat);

btnBabsatu.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
babsatu();
}
});
btnBabdua.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
babdua();
}
});
btnBabtiga.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
babtiga();
}
});
btnBabempat.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
babempat();
}
}
);}
//membuat method untuk tombol ayobelajar
public void babsatu() {
// TODO Auto-generated method stub
Intent i=new Intent(this, Babsatu.class);
startActivity(i);
}
//membuat method untuk tombol ayomencoba
public void babdua() {
// TODO Auto-generated method stub
Intent i=new Intent(this, Babdua.class);
startActivity(i);
}
//membuat method untuk tombol keluar
public void babtiga() {
// TODO Auto-generated method stub
Intent i=new Intent(this, Babtiga.class);
startActivity(i);
}
//membuat method untuk tombol keluar
public void babempat() {
// TODO Auto-generated method stub
Intent i=new Intent(this, Babempat.class);
startActivity(i);
}
}
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/LinearLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/bingkai"
android:orientation="vertical"
tools:context=".Menuutama" >

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingTop="100dp" >

<Button
android:id="@+id/btnAyobelajar"
android:layout_width="115dp"
android:layout_height="50dp"
android:layout_marginLeft="60dp"
android:background="@drawable/ayobelajarr"
android:text=" " />

<Button
android:id="@+id/btnAyomencoba"
android:layout_width="115dp"
android:layout_height="50dp"
android:layout_marginLeft="160dp"
android:layout_marginTop="40dp"
android:background="@drawable/ayomencobaa"
android:text=" " />

<Button
android:id="@+id/btnKeluar"
android:layout_width="115dp"
android:layout_height="50dp"
android:layout_marginLeft="100dp"
android:layout_marginTop="40dp"
android:background="@drawable/keluar"
android:text=" " />
</LinearLayout>

</LinearLayout>

You might also like