1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
| package com.example.abbha.arbre;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class arbre extends AppCompatActivity implements View.OnClickListener {
private Button btn_arbre;
private Button btn_personne;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_arbre);
btn_arbre = (Button) findViewById(R.id.btn_arbre);
btn_personne = (Button) findViewById(R.id.btn_personne);
btn_arbre.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent gameActivityIntent = new Intent(arbre.this, MainActivity.class);
startActivity(gameActivityIntent);
}
});
btn_personne.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent gameActivityIntent = new Intent(arbre.this, MainActivity.class);
startActivity(gameActivityIntent);
}
;});}
@Override
public void onClick(View v) {
}
} |
Partager