blackberry / bbUI.js

BlackBerry UI look and feel JavaScript toolkit for WebWorks
Apache License 2.0
312 stars 192 forks source link

Request: classic support for bbui.js #1037

Open MerrickZ opened 9 years ago

MerrickZ commented 9 years ago

for example. when pushed a screen like "settings", press back button, it should execute "popscreen", but now it just minimized the app to background. when press menubutton, it should open the app menu, but it did nothing. this should be implemented.

T-M-C commented 9 years ago

you can easily assign your own function, like "popscreen" to the button:

document.addEventListener("deviceready", function () {
    document.addEventListener('menubutton', onMenuButton);
    document.addEventListener('backbutton', onBackButton);
}); 
function onMenuButton() {
    console.log("The Menu button was pressed");
}

function onBackButton() {
    console.log("POPSCREEN?");
}

https://developer.blackberry.com/html5/documentation/v2_2/handling_bb_classic_buttons.html (needs com.blackberry.app plugin, if you had it before, remove and add it again to update it)