This library adds a new type of scrollview widget to the widget.* library under the name widget.newDragItemsScrollView(). The scroll view can then have display objects added to it which can be dragged off the scrollview by either touching and holding or pulling them in a given direction.
Well, there is a time ago was looking for a function that uses one button with two functions, and saw the people looking for it. I found a possible solution that worked for me. and I will share here.
Hello, I am Brazilian and sorry for any errors, my English is bad.
The sample code can be downloaded from the gist attached link.
i think the idea is cool
just one loop will create small objects (circles or rectangles) to fill the screen
each object will have the same touch event which will fill the object with a randomly selected color
add a few lines to have different background color, and different sizes for your objects