package fr.iutfbleau.dev45.wamster.tp05ex02_arcenciel;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        View arrierePlan = findViewById(R.id.arrierePlan);
        Button bouton = findViewById(R.id.bouton);

        EvenementClic evenementClic = new EvenementClic(arrierePlan);
        EvenementBoutonChoix evenementBoutonChoix = new EvenementBoutonChoix(this);

        arrierePlan.setOnTouchListener(evenementClic);
        bouton.setOnClickListener(evenementBoutonChoix);
    }
}