phonegap/cordova を使用せずに、android のデフォルトの戻るボタン イベントを sencha touch にマップする方法はありますか?
1 に答える
1
これが役立つかもしれません:
if (Ext.os.is('Android')) {
document.addEventListener("backbutton", Ext.bind(onBackKeyDown, this), false); // add back button listener
function onBackKeyDown(e) {
e.preventDefault();
// You are at the home screen
if (Ext.Viewport.getActiveItem().xtype == selectedHomePage.xtype ){
Ext.Msg.confirm(
"",
Are You sure, exit?,
function(buttonId) {
if(buttonId === 'yes') {
navigator.app.exitApp();
}
}, this);
} else {
}
}
}
于 2013-03-21T22:08:31.623 に答える