package fr.iutfbleau.grille;

import android.graphics.Color;
import android.view.GestureDetector;
import android.view.MotionEvent;
import android.view.View;

public class ControleurDoubleTap implements GestureDetector.OnDoubleTapListener {

    private final View composant;

    public ControleurDoubleTap(View composant) {
        this.composant = composant;
    }

    @Override
    public boolean onDoubleTap(MotionEvent e) {
        this.composant.setBackgroundColor(Color.MAGENTA);
        return true;
    }

    @Override
    public boolean onDoubleTapEvent(MotionEvent e) {
        return false;
    }

    @Override
    public boolean onSingleTapConfirmed(MotionEvent e) {
        this.composant.setBackgroundColor(Color.CYAN);
        return true;
    }
}
