I'm sorry for bed English.
I got the Event Touch thingy runing. bat my code is not rally good.
is there a batter way of doing this or a right way of doing it?
I'm making a invisible box where i can press the screen, its like a button.
the code is working i thing. when i touch the screen where the y and x i do get respond.
i made the program exit, and then open a other window.
note: I me by using the code in a wrong way. I was having a hard time understanding
java in general. im using MotionEvent is that okkay for this?
@Override
public boolean onTouch(View v, MotionEvent event) {
// TODO Auto-generated method stub
x = event.getX();
y = event.getY();
switch(event.getAction()){
case MotionEvent.ACTION_DOWN:
break;
case MotionEvent.ACTION_UP:
if(y > 50 && y < 100 && x > 50 && x < 100){
}
break;
}
return true;
}