ajout listener
This commit is contained in:
parent
6079ddb71f
commit
68edb7645c
@ -23,6 +23,7 @@ public class GameView extends View {
|
||||
super(context);
|
||||
this.saisie=saisie;
|
||||
this.grille=grille;
|
||||
this.setOnTouchListener(new TouchListener());
|
||||
//on initialise les collections de pions
|
||||
initpions();
|
||||
this.circle = new Paint();
|
||||
|
@ -0,0 +1,22 @@
|
||||
package com.example.mastermind.game;
|
||||
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
|
||||
public class TouchListener implements View.OnTouchListener{
|
||||
|
||||
public TouchListener(){}
|
||||
|
||||
@Override
|
||||
public boolean onTouch(View v, MotionEvent event) {
|
||||
int action = event.getActionMasked();
|
||||
Float x = event.getX();
|
||||
Float y = event.getY();
|
||||
|
||||
if (action==MotionEvent.ACTION_UP)
|
||||
{
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user