EnableBackKey en- or disables the standard behaviour of the device back key. If disabled, the app will not close when the back key is pressed.
Example - Example
function OnStart()
{
app.EnableBackKey( false );
}
function OnBack()
{
var yesNo = app.CreateYesNoDialog( "Exit App?" );
yesNo.SetOnTouch( yesNo_OnTouch );
yesNo.Show();
}
function yesNo_OnTouch( result )
{
if( result=="Yes" ) app.Exit();
}
Example - Menu Images
function OnStart()
{
menus = "Files:Files.png,Settings:Settings.png";
app.EnableBackKey( menus, "/Sys/Img" );
}
function OnMenu( item )
{
app.ShowPopup( item, "Short" );
}