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

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


Sponsored Links
 Hi,

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.

-niko



>



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. Query...

How can apply motion like touch screen animation in android...
I apply the following code

  ViewFlipper vf = (ViewFlipper) findViewById(R.id.details);
                // Set an animation from res/anim: I pick push left out

vf.setAnimation(AnimationUtils.loadAnimation(view.getContext(),
R.anim.push_left_out));
                vf.showPrevious();

But by using this I cant get the output like sequence in motion. So
what would be the actul code?



-Regards,

Nisha

--~--~---------~--~----~------------~-------~--~----~

2. Searchable Dictionary Example: R.raw.definitions cannot be resolved

Hi there,

I am trying to compile the Searchable Dictionary example on my Eclipse
(OS: XP)

http://developer.android.com/guide/samples/SearchableDictionary/index.html

but it complians about "R.raw.temp" cannot be resolved at line 92 of
Dictionary.java file:

InputStream inputStream = context.getResources().openRawResource
(R.raw.temp);

Has anyone had similar problem and any solution please?

Many thanks,

Huan

--~--~---------~--~----~------------~-------~--~----~

3. Android market application on emulator

4. is there anything wrong with the function camera.takePicture()???

5. Android Dev Phone 1 Out Of Stock :-(

6. Fwd: How to add multiple frame buffer support in Android?

7. An approach and very **drafty** sample code for utilizing "models" for storing widget state..