Android上的PhoneGap jQueryMobile主题 [英] Phonegap jQueryMobile Theme on android
问题描述
我在这里,我需要你的帮助。我一直对Android应用了数个月,今天的企业要求我使用PhoneGap的是创建一个杂合体应用程序。
Here I am and I need your help. I've been working on Android applications for a few months and today the enterprise asks me to use Phonegap as to create a hybride app.
我想尝试一些主题与的ThemeRoller 但是当我尝试输入文件我的应用程序,不顺心的事:主题不适用!
好了,因为如果我用我的WEB浏览器看一下应用程序,主题完美地适用,但是当我建立和放大器这部分是真实的;我的手机上运行应用程序,就好像没有发现任何CSS文本将出现。
I'd like to try some themes with ThemeRoller but when I try to input the files in my app, something goes wrong : the theme doesn't apply ! Well, this is partly true because if I look at the app using my web Browser, the theme applies perfectly but when I build & run the app on my phone, the text will appear as if there weren't any CSS.
为什么只有在手机上?我一直在寻找各地的网络,甚至找到<一href=\"http://stackoverflow.com/questions/18012517/i-am-not-getting-customized-ui-of-themeroller-in-mobile-for-phonegap-android\">That联系!的这正是和我同样的问题,但我想他什么工作并没有什么好发生在我身上,没有新的结果,变化都没有。
Why only on the phone ? I've been looking around the web and even found That link ! It's exactly the same question as mine but I tried what worked for him and nothing good happened to me, no new result, no change at all.
因此,这里是我的index.html头:
So here is the header of my index.html :
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>jQuery Mobile: Theme Download</title>
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js"></script>
<link rel="stylesheet" href="web-holo/AndroidHoloDarkLight.min.css" />
<link rel="stylesheet" href="jquery.mobile.structure-1.3.2.min.css" />
<link rel="stylesheet" href="roboto/fonts.css" />
</head>
这是我发现的主题网站上:的该网站
我输入WWW主题文件夹,但不管怎么说,code发现它,因为桌面Web浏览器正确显示它...
And here is the website I found the theme on : That Web Site I input the Theme folder in WWW but anyway the code found it since the Desktop web browser displays it correctly...
感谢您的帮助!
推荐答案
我的答案多亏得Aliassse!
I got the answer thanks to Aliassse !
在万阿英,蒋达清是白名单!
我创建从WWW / config.xml中文件的修改在网络上发现了一个基本的应用我的应用程序。
事实上,我可以在XML文件的末尾看到:
The probelm was the WhiteList ! I was creating my app from a basic application found on the web which "www/config.xml" file was modified. Indeed I could see at the end of the xml file :
<access origin="http://127.0.0.1*"/> <!-- allow local pages -->
这意味着应用程序只能访问本地的网页,不在线。而我需要访问页,如:
This means that the app can only access to local pages, not online. And I needed to access pages like :
HTTP://$c$c.jquery.com/ jQuery的-1.9.1.min.js
因此,为了解决这个问题,我改变了虚线为:
So in order to solve that, I changed the broken line to :
<access origin="*"/>
我重新建造的应用程序,我的设备上运行它和它的工作!一个沉重的感谢Aliassse的在于快速,高效!
I built the app again, run it on my device and it worked ! A heavy thanks to Aliassse for being that fast and efficient !
这篇关于Android上的PhoneGap jQueryMobile主题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!