User Tools

Site Tools


Privacy Policy


Version 2.50 is out since Jan 1st 2022

Frequently Asked Questions


Note for contributors

If you wish to create a new page in the DroidScript wiki, please click on the most appropriate namespace above and follow the notes for contributors there.

Because of spam, it has been necessary to add a CAPTCHA to the registration form and the save option for editing pages. You will not need to prove you are human if you are logged in, so please register.

Please feel free to improve any existing page, as well as adding new pages to increase the sum of public knowledge about DroidScript.

Formatting Syntax


Seekbar SetOnTouchUp

(Sample Code posted by Steve Garman taken from the DroidScript Google Group)

Is something like that posible? There is no built-in way of doing this at present. But with this workaround you can simulate this.

//Called when application is started.
function OnStart()
    //Create a layout with objects vertically centered.
    lay = app.CreateLayout( "absolute", "" );    
    //Create a text label and add it to layout.
    skb = app.CreateSeekBar( 0.8 );
    skb.SetPosition(0.1, 0.4, 0.8, 0.1);
    img = app.CreateImage(null, 0.8, 0.1);
    lay.AddChild( skb );
    //Add layout to app.    
    app.AddLayout( lay );
function imgSetup()
    img.SetPosition(0.1, 0.4, 0.8, 0.1);
function imgOnTouch(ev)
    app.SimulateTouch(skb, ev.X, ev.Y, ev.action);
    if(ev.action == "Up") skbOnTouchUp(ev);
function skbOnTouchUp(ev)
tips_tricks/seekbar_setontouchup.txt · Last modified: 2015/03/04 01:25 (external edit)