This shows you the differences between two versions of the page.
app_methods:enablebackkey [2015/02/22 09:34] octazid created |
app_methods:enablebackkey [2015/03/04 23:56] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | =====app.EnableBackKey===== | ||
- | (Sample taken from the Droidscript documentation) | ||
- | <code javascript> | ||
- | function OnStart() | ||
- | { | ||
- | app.EnableBackKey( false ); | ||
- | } | ||
- | function OnBack() | ||
- | { | ||
- | var yesNo = app.CreateYesNoDialog( "Exit App?" ); | ||
- | yesNo.SetOnTouch( yesNo_OnTouch ); | ||
- | } | ||
- | |||
- | function yesNo_OnTouch( result ) | ||
- | { | ||
- | if( result==" | ||
- | } | ||
- | </ |