package com.example.fleche;

import android.content.DialogInterface;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;

public class FlecheListener implements View.OnClickListener {

    private ImageView imgFleche;
    private Button ButtonG;
    private Button ButtonD;
    FlecheListener(ImageView img, Button left, Button right) {
        super();
        this.imgFleche = img;
        this.ButtonG = left;
        this.ButtonD = right;
    }

    @Override
    public void onClick(View view) {
        if(view.getId()==ButtonD.getId()) {
            this.imgFleche.setImageResource(R.drawable.fleche_droite);
            Log.v("test","droite");
        }
        if (view.getId()==ButtonG.getId()) {
            this.imgFleche.setImageResource(R.drawable.fleche_gauche);
            Log.v("test","gauche");
        }
    }
}
