0

An experiment in learning Android is to detect two-finger presses. I have an app that changes a custom ImageView to a random pic on a touch. That works fine. I now want it to only change the picture when two or more fingers press. I have an IF statement to only randomize the picture if pointerCount>1. It doesn't do anything.

I have my ASUS Transformer TF101 connected to the PC. I have a simple custom ImageView with an onTouch event.

public boolean onTouchEvent(MotionEvent event) {
    int number =event.getPointerCount();
    if (number > 1){
        *randomise pic*

I examine the value of 'number' during a debug step-through (Log.d doesn't work for me from this ASUS :() and it's always 1 no matter how many fingers I touch with.

Any ideas?

Tanveer Munir
  • 1,956
  • 1
  • 12
  • 27
Tickled Pink
  • 969
  • 2
  • 14
  • 26

1 Answers1

-3

(X) return false;

(X) return super.onTouchEvent(event);

(O) return true;