Back

EnableBackKey

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.

app.EnableBackKey( enable )

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();
}
    Copy     Copy All       Run      

Example - Menu Images



function OnStart()
{
    menus = "Files:Files.png,Settings:Settings.png";
    app.EnableBackKey( menus, "/Sys/Img" );
}

function OnMenu( item )
{
    app.ShowPopup( item, "Short" );
}
    Copy     Copy All       Run      

boolean