My favorites
▼
|
Sign in
myandroidwidgets
Sample Apps for Android
Project Home
Downloads
Wiki
Issues
Source
Checkout
Browse
Changes
Source path:
svn
/
trunk
/
JQueryExample
/
src
/
com
/
beanie
/
samples
/
jquery
/
jsinterfaces
/
JSInterface.java
r56
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package com.beanie.samples.jquery.jsinterfaces;
import com.beanie.samples.jquery.OnExitAppListener;
import android.webkit.WebView;
public class JSInterface
{
private WebView webView;
private OnExitAppListener listener;
public JSInterface(WebView webView)
{
this.webView = webView;
}
// This method is called from Javascript
/*
function nativeToggle(){
// jsinterface is the object of our JSInterface class
// nativeToggle() method in turn calls the jsToggle method through the webView
window.jsinterface.nativeToggle();
}
*/
public void nativeToggle()
{
webView.loadUrl("javascript:jsToggle()");
}
public void exitApp(){
listener.onAppExit();
}
// Listener used to propagate the JS event to the activity
public void setOnExitAppListener(OnExitAppListener listener){
this.listener = listener;
}
}
Show details
Hide details
Change log
r26
by coomar.101 on Oct 19, 2010
Diff
Initial commit
Go to:
/trunk/JQueryExample/.classpath
/trunk/JQueryExample/.project
...QueryExample/AndroidManifest.xml
/trunk/JQueryExample/assets
...nk/JQueryExample/assets/icon.png
...ample/assets/jquery-1.4.2.min.js
...yExample/assets/sample_page.html
...yExample/assets/sample_style.css
...JQueryExample/default.properties
/trunk/JQueryExample/res
.../JQueryExample/res/drawable-hdpi
...ample/res/drawable-hdpi/icon.png
.../JQueryExample/res/drawable-ldpi
...ample/res/drawable-ldpi/icon.png
.../JQueryExample/res/drawable-mdpi
...ample/res/drawable-mdpi/icon.png
/trunk/JQueryExample/res/layout
...QueryExample/res/layout/main.xml
/trunk/JQueryExample/res/values
...ryExample/res/values/strings.xml
/trunk/JQueryExample/src
/trunk/JQueryExample/src/com
/trunk/JQueryExample/src/com/beanie
...ryExample/src/com/beanie/samples
...le/src/com/beanie/samples/jquery
...samples/jquery/HomeActivity.java
...es/jquery/OnExitAppListener.java
...com/beanie/samples/jquery/client
...y/client/SampleChromeClient.java
...anie/samples/jquery/jsinterfaces
...ry/jsinterfaces/JSInterface.java
Project members,
sign in
to write a code review
Older revisions
All revisions of this file
File info
Size: 940 bytes, 39 lines
View raw file
Powered by
Google Project Hosting