I have made a simple phone pad, numbers 0-9, dial, etc. I have used imagebuttons. I then tried onclick.
The problem with onclick is it activates when you stop pressing the button, not when you actually press the button. I know it's a small thing but it seems odd from a users perspective.
So I tried ontouch with actiondown and imagebuttons, but then multiple ontouch doesn't work so I added multitouch. Now the second or third button makes the first button re-activate instead of the one pressed activate. How can I get a standard phone pad working with with imagebuttons plus multi-touch or something similar?
ImageButton ibone = (ImageButton) findViewById(R.id.imageButton1);
ibone.setSoundEffectsEnabled(false);
ibone.setOnTouchListener(new View.OnTouchListener() {
public boolean onTouch(View v, MotionEvent event) {
int tempy = event.getActionMasked();
if (tempy == 0 || tempy == 5) { // if an action down primary or secondary touch has occurred then...
// DO STUFF
}
return false;
}
PS I tried
return true;
to same effect
I am sorry, I really don't understand multi-touch implementation at all.