Android Question How to click 2 buttons or move 2 seekbars at the same time?

Danny Poon

New Member
Licensed User
Longtime User
Hi chaps,

First time poster. I just started using Basic4Android a week ago. I am thinking to write an Android app to control my RC car through the bluetooth communication.

Imagine I have 4 buttons, 2 on the left controlling the forward/backward motions and 2 on the right to control left/right. I would like to click the forward and right buttons at the same time to move my RC car forward and right. A very similar question: once the first little program is done to ensure all the hardware is working properly, I would like to use 2 seekbars instead: 1 for controlling the speed and 1 for controlling the servo angle. Again how can I move the 2 seekbars at the same time?

I did a search already and came across multi-touch using the Gestures library. Is it the only way to receive multiple responses?

Any tips or sample code would be appreciated.

Thanks in advance.
 
Last edited:

sorex

Expert
Licensed User
Longtime User
it's easier (I think) , panels (and images?) have their touch event so you can figure out where they get touched.

with a bit of luck it triggers both touches so you could use that.
 
Upvote 0

Danny Poon

New Member
Licensed User
Longtime User
Thanks for the speedy response.

Are you saying that I don't need to use the Gestures library, simply use several panels to capture their events at the same time?
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
that's the esiest way indeed. not sure if these multi touch events get triggered right. you'll have to test that.
 
Upvote 0

Similar Threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…