Extension: Multitouch. You can touch concurrently zones in screen.

374 views
Skip to first unread message

Juan Antonio

unread,
Dec 3, 2017, 5:30:00 PM12/3/17
to mitappinv...@googlegroups.com
Hi friends,

Multitouchmulti-touch refers to the capability of a touchscreen  to recognize two or more points of contact on the surface concurrently.

In this extension I use an HorizontalArrangement

- Extension split this HA in three horizontal zones with same size (left, medium. right)

When you touch zones left, medium or right, fire an event.

You can touch 2 o 3 zones concurrently.

To distinguish the zones I use images blue and green.

In this example we light 1, 2, or 3 lamps touch zones greens o blue.



- If you touch a color and drag your finger to other color, that lamp remains ON.


This extension is in trial period, in other post I'll upload others Multitouch with 4 and 9 zones, and multitouch in Canvas.


Regards.



Juan Antonio Villalpando.


Tutorial in Spanish: http://kio4.com/appinventor/295_extension_multitouch.htm


Regards,

p195_multitouch3.aia
com.KIO4_Multitouch3.aix

Abraham Getzler

unread,
Dec 4, 2017, 2:23:46 PM12/4/17
to MIT App Inventor Forum
Does this require any Manifest changes or a minimum Android level?
ABG

Juan Antonio

unread,
Dec 4, 2017, 6:33:18 PM12/4/17
to mitappinv...@googlegroups.com
Now multitouch with 4 zones.

   


- This extension does not modify the AndroiManifest, does not use new permissions or libraries of other authors. I only tried it with API22, but I think it works with most APIs, since it only uses typical Android functions: setOnTouchListener and onTouch, it does not use gesture.


http://kio4.com/appinventor/295_extension_multitouch.htm


Regards.

p195_multitouch4.aia
com.KIO4_Multitouch4.aix

Abraham Getzler

unread,
Dec 5, 2017, 10:46:24 AM12/5/17
to MIT App Inventor Forum
Have you given any thought to generalizing this to an unlimited
list of zones, either by using Arrangements as zones, or by
linear division?

The touch events would need a Selection subArrangement component
value return value, or a SelectionIndex value, similar to a List Picker
selection event.

ABG

Juan Antonio

unread,
Dec 5, 2017, 12:55:58 PM12/5/17
to mitappinv...@googlegroups.com
With this new version we dispone of nine zones.

- This extension uses a TableArrangement with 3 Columns and 3 Rows.

- If you touch a color and drag your finger to other color, that lamp remains ON.

- In Properties, Width of images is 33 percent.


- In this moment number of zone is static (extension builds it), I'll try a dinamic number of zone (user set that number), difficult proposal but I will try.


- In block Coordinates we can get position absolute (Screen) and relative (TableArrangement) of pointer.

- I'll try other possibilities.

http://kio4.com/appinventor/295_extension_multitouch.htm

p195_multitouch9.aia
com.KIO4_Multitouch9.aix
Reply all
Reply to author
Forward
0 new messages