I wonder about "Pointer ID" which is obtained using
ACTION_POINTER_ID_MASK.
Documentation says "Pointer ID" is not "Array Index" but "ID", and
"Index" can be found with findPointerIndex("ID").
But when I examine source file("InputDevice.java"), it looks like
"Array Index" instead of "ID" as quoted below.
"upOrDownPointer" does not seems to be "ID", and it must be "Array
Index".
if (nextNumPointers > lastNumPointers) {
if (lastNumPointers == 0) {
action = MotionEvent.ACTION_DOWN;
mDownTime = curTime;
} else {
action = MotionEvent.ACTION_POINTER_DOWN
| (upOrDownPointer <<
MotionEvent.ACTION_POINTER_ID_SHIFT);
}
} else {
if (numPointers == 1) {
action = MotionEvent.ACTION_UP;
} else {
action = MotionEvent.ACTION_POINTER_UP
| upOrDownPointer <<
MotionEvent.ACTION_POINTER_ID_SHIFT);
}
}
If documentation is right, I think framework source code should be
fixed like below.
action = MotionEvent.ACTION_POINTER_UP
| mPointerIds[upOrDownPointer] <<
MotionEvent.ACTION_POINTER_ID_SHIFT);
Could you clarify this issue for me?
On 2009년11월17일, 오전11시30분, Dianne Hackborn <[email protected]> wrote:
> On Sun, Nov 15, 2009 at 7:21 PM, niko20 <[email protected]> wrote:
>
> > I wish though, that the multitouch would have also been natively
> > suuportedk in the sense that multiple views should get touch events
> > also simultaneously.
>
> Very, very deliberately not supported. :) You'll need to look at the events
> arriving in a particular view and do what you want with them. It is too big
> a can of worms to try to treat these as different event streams, because
> they really aren't independent, and in many cases the view of the first
> press really does want to see all of different finger touches during that
> motion.
>
> Also the data you get from the screen is likely not going to be completely
> independent with respect to multiple fingers -- for example on the
> G1/Sapphire class screen there are interactions between the two points
> reported, and if you play with Pointer Location on Droid you will see that
> pressing a second finger can cause noticeable jitter in the first finger.
>
> --
> Dianne Hackborn
> Android framework engineer
> [email protected]
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails. All such
> questions should be posted on public forums, where I and others can see and
> answer them.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en