Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/216.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何从android活动调用jquery mobile_Android_Jquery Mobile - Fatal编程技术网

如何从android活动调用jquery mobile

如何从android活动调用jquery mobile,android,jquery-mobile,Android,Jquery Mobile,我正在开发一款android应用程序。。在这两者之间,我想添加移动jquery 已经有一个由其他人开发的jquery项目。 我想在我的活动中调用该html页面 我是否需要创建一个webview并将其命名为??或者我可以直接调用html页面直接形成活动吗 还有一件事。。如何将jquery项目添加到我的项目中,我的意思是。。。我可以把它放在哪个文件夹里?? 请让我帮忙 这是我的xml代码 <RelativeLayout xmlns:android="http://schemas.android

我正在开发一款android应用程序。。在这两者之间,我想添加移动jquery

已经有一个由其他人开发的jquery项目。 我想在我的活动中调用该html页面

我是否需要创建一个webview并将其命名为??或者我可以直接调用html页面直接形成活动吗

还有一件事。。如何将jquery项目添加到我的项目中,我的意思是。。。我可以把它放在哪个文件夹里?? 请让我帮忙

这是我的xml代码

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity" >

<WebView
    android:id="@+id/webView1"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_alignParentRight="true"
    android:layout_centerVertical="true" /> </RelativeLayout>


提前谢谢

您必须将Jquery移动页面(+css/scripts)放在
assets/www
文件夹中。然后您可以调用
webView.loadUrl(“file:///android_asset/www/index.html");,在任何Web视图中。
不要忘记调用
webView.getSettings().setJavaScriptEnabled(true)确保您在
清单
中拥有
互联网
权限,以防万一