Why isn鈥檛 multi-touch wor king for imagebuttons?

by niko20 » Wed, 05 May 2010 01:42:31 GMT

Sponsored Links

No, it's because the android team decided to implement MultiTouch in a
way that it only can be used on one "View". For example, ImageButtons
are views. Each ImageButton is a seperate "View" object. The Android
multitouch does not just map touches to multiple views like that
(which I think it should, but the android team does not). Instead you
end up having to create a View yourself, and drawing the three buttons
yourself, since multitouch comes to a View as additional touch
coordinates. In other words, you can only use multitouch "per view".
It can't spread across multiple views. You basically need to create
one big view object that takes up most of the screen and then draw the
buttons yourself, and then handle the multitouch messages passed to
that view.

Unless there is an easier way that I know of, but I dont think there
is. IMO how they "implemented" multitouch is too hackish, and should
have been transparent to developers by the system automatically
posting messages to each view that was being touched, instead, you
have to rewrite the apps completely to handle it.



Why isn鈥檛 multi-touch wor king for imagebuttons?

by Bob Kerns » Fri, 07 May 2010 23:05:14 GMT

 What about using a TouchDelegate to examine the touches first, and
forward them as separate events?

I haven't tried it, or even thought about it for more than two
minutes, but...

> >

Sponsored Links

Other Threads

1. onFling

Finally I found a way to synchronize the scrolls. I was using a
gesture listener to listen for scrolls/flings which did not give me
accurate results. Now I simply pass the onTouch events from one view
to the other view. This makes both the views to scroll perfectly in


2. Can a image rotate 90 in YUVMonochromeBitmapSource Zxing?


 I have a demo based on Android1.5 and Zxing,

 our alteration is as follow:

 <activity android:name=".MainActivity"

 MainActivity is a subClass of TabActivity,
     Intent captureIntent = new Intent(this, CaptureActivity.class);
 getResources().getDrawable (R.drawable.tab_autoscan)).setContent

 In the class CameraManager   private void setCameraParameters() {
     Camera.Parameters parameters = mCamera.getParameters();
     parameters.set("orientation", "portrait");
     parameters.set("rotation", 90);

 I am testing at 1.5 now,
 In the class DecodeThread, running the method "decode", the result is
 I look up the sourcecode zxing,

   YUVMonochromeBitmapSource source = new

   YUVMonochromeBitmapSource don't support  rotate function.

 Could you share a idea for solving this problem?

 Thanks in advance...


3. How Display list of all video files on android system?

4. How create LatinIME's binary dictionary(why get the child node address by the same address)

5. Additional code generation after aapt runs?

6. Alsa rendering not working for sampling rates different from 44.1 khz

7. Documentation on SMS Content Provider?