Posts

Showing posts with the label linear motion

How to set Seekbar to jump in Sketchware App?

Image
The Seekbar , which has recently been added to Sketchware in it's latest version, has opened a wide range of possibilities for android app development. Here I will describe how the Seekbar can be converted into a jumping object. 1. Start a new project in Sketchware. In the view area , first insert a Linear(V) and set it's width and height to match parent. Inside that insert a Linear(H) , and a Seekbar into that Linear(H). Note that maximum width of Seekbar is 100 . Set the top margin of this Linear(H) to 200 and set it's rotation to 270. 2. Insert another Linear(H) below the previous one, and inside that insert a Button . Set the top margin of this Linear(H) to 160 and set it's gravity to center_horizontal . 3. Now in Logic area add a new Timer component named time. 4. Add a new number variable named t . Also add a new block named Jump . 5. On activity create set t =0 , and disable Seekbar .  6. Then define Jump . Use TimerTask t