1
我正在使用HTML/Canvas,Javascript和CSS在Phonegap上使用Android应用程序。使用下面的代码,我将画布拉伸到全屏。没有滚动Android应用程序
var canvas = $("#mycanvas");
var ctx = canvas.get(0).getContext("2d");
canvas.attr("width", $(window).get(0).innerWidth);
canvas.attr("height", $(window).get(0).innerHeight);
ctx.clearRect(0, 0, canvas.width, canvas.height);
我也修复了AndroidManifest.xml文件中的横向视图。
android:screenOrientation="landscape"
而在config.xml中我打电话给全屏。
<preference name="fullscreen" value="true" />
到目前为止好,但有一个大问题。我可以从屏幕上滚动我的应用,尽管这里没有内容。我只看到深灰色的背景。
有没有人有任何想法如何解决这个问题?我会很感激。
谢谢你,它的工作优秀... – Tomaz77