I am currently working on an e-book for the android platform. I'm using Eclipse, Dreamweaver and the phonegap libraries. Is there a way i can have a new page or dialog display on the action of 开发者_JAVA百科pressing the menu key.
Add this line to your onLoad handler
<script type="text/javascript" charset="utf-8">
function onLoad() {
document.addEventListener('menubutton', onMenuKeyDown);
}
function onMenuKeyDown() {
}
You can then perform any action you like in your onMenuKeyDown function.
精彩评论