JAVA
package com.al_quran;import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageButton;
public class MainActivity extends Activity implements OnClickListener {
ImageButton imageButton1;
ImageButton imageButton2;
ImageButton imageButton3;
@Override
public void onCreate (Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
ImageButton imageButton=(ImageButton) findViewById(R.id.imageButton);
imageButton.setOnClickListener(this);
}
public void onCreate1 (Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
ImageButton imageButton=(ImageButton) findViewById(R.id.imageButton1);
imageButton.setOnClickListener(this);
}
public void onCreate2 (Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
ImageButton imageButton=(ImageButton) findViewById(R.id.imageButton2);
imageButton.setOnClickListener(this);
}
public void onClick(View arg0) {
// TODO Auto-generated method stub
if(arg0.getId() == R.id.imageButton2){
Intent i = new Intent(this, Jpage4.class);
startActivity(i);}
}
public void onClick1(View arg0) {
// TODO Auto-generated method stub
if(arg0.getId() == R.id.imageButton2){
Intent i = new Intent(this, Jpage4.class);
startActivity(i);}
}
public void onClick2(View arg0) {
// TODO Auto-generated method stub
if(arg0.getId() == R.id.imageButton2){
Intent i = new Intent(this, Jpage4.class);
startActivity(i);
}
}
}
Posting Komentar untuk "JAVA APLIKASI ANDROID "