[英]jquery mobile site not formatting on android device
I am using an example from www3schools to see how to create an application on an android device; 我使用来自www3schools的示例来了解如何在android设备上创建应用程序;
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet"
href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css">
<script src="http://code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-
1.4.5.min.js"></script>
<script>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "//hm.baidu.com/hm.js?73c27e26f610eb3c9f3feb0c75b03925";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
</head>
<body>
<div data-role="page" id="pageone" data-theme="a">
<div data-role="header">
<h1>Page Header</h1>
</div>
<div data-role="main" class="ui-content">
<p>Some Text..</p>
<a href="#">A Standard Text Link</a>
<a href="#" class="ui-btn">Link Button</a>
<p>A List View:</p>
<ul data-role="listview" data-autodividers="true" data-inset="true">
<li><a href="#">Adele</a></li>
<li><a href="#">Billy</a></li>
</ul>
<label for="fullname">Input Field:</label>
<input type="text" name="fullname" id="fullname" placeholder="Name..">
<label for="switch">Toggle Switch:</label>
<select name="switch" id="switch" data-role="slider">
<option value="on">On</option>
<option value="off" selected>Off</option>
</select>
</div>
<div data-role="footer">
<h1>Page Footer</h1>
</div>
</div>
</body>
</html>
The screen shot below shows the view from browser on my computer; 下面的屏幕快照显示了我计算机上浏览器的视图;
The screen shot below shows the browser view on my android device; 下面的屏幕快照显示了我的android设备上的浏览器视图; running android version 7;
运行android版本7;
I am using phonegap online build to create the app which is downloaded to the android device. 我正在使用phonegap在线构建来创建应用程序,该应用程序已下载到android设备。 I can not see why this is not rendering the same in the android device.
我看不到为什么这不能在android设备中呈现相同的内容。 I am using the same browser in each, chrome.
我在chrome中使用相同的浏览器。 Any guidance would be appreciated.
任何指导将不胜感激。
I have finally solved this. 我终于解决了。 I was uploading just the index.html to the online phone gap build service.I now have included the other files that phonegap uses when linking to a local device.
我只是将index.html上传到在线电话差距构建服务。现在,我包括了phonegap链接到本地设备时使用的其他文件。 This has fixed the problem.
这解决了问题。 I thought these would have been added automatically by the online build site.
我认为这些应该由在线构建站点自动添加。 See screen shot below of app on phone.
请在手机上查看以下应用的屏幕截图。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.