mardi 31 mars 2015

crosswalk-project android full screen

In my html5 game, I have a login field and therefore when the user enter the text fields(username and password), the android keyboard pop up along with the onscreen soft keys(where back button and menu button is present).


While building my app with crosswalk, I set the display to fullscreen in the manifest and it is working fine except for this login screen bringing back the soft buttons. I have no knowledge of native android coding and is wondering if the buttons can be hidden again through API calls from the javascript.


The scaling of the html is done through meta viewport in the html and the game behaves like that of a browser.



var scale = screen.availWidth/1024;
var vp = document.querySelector("meta[name='viewport']");
vp.setAttribute("content","width=device-width, user-scalable=no, initial-scale="+scale);


I did tried my canvas to request full screen and it works but the size of the canvas is not taking the whole screen and it looks bad again.


Any suggestions on how I should proceed or which article I should be reading or direct solution?


Also, if you need any more information or code, let me know. Thanks!


Aucun commentaire:

Enregistrer un commentaire