Skip to content

Commit

Permalink
add some Chinese to demo
Browse files Browse the repository at this point in the history
  • Loading branch information
uknownothingsnow committed Jan 4, 2016
1 parent 915121f commit 7b29385
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions example/src/main/assets/demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
var str2 = document.getElementById("text2").value;

//send message to native
var data = {id: 1, content: "this is html test <img src=\"a.png\"/> test\r\nhahaha"};
var data = {id: 1, content: "这是一个图片 <img src=\"a.png\"/> test\r\nhahaha"};
window.WebViewJavascriptBridge.send(
data
, function(responseData) {
Expand All @@ -63,7 +63,7 @@
//call native method
window.WebViewJavascriptBridge.callHandler(
'submitFromWeb'
, {'param': str1}
, {'param': '中文测试'}
, function(responseData) {
document.getElementById("show").innerHTML = "send get responseData from java, data = " + responseData
}
Expand Down Expand Up @@ -92,7 +92,7 @@
bridge.init(function(message, responseCallback) {
console.log('JS got a message', message);
var data = {
'Javascript Responds': 'Wee!'
'Javascript Responds': '测试中文!'
};
console.log('JS responding with', data);
responseCallback(data);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public void openFileChooser(ValueCallback<Uri> uploadMsg) {
@Override
public void handler(String data, CallBackFunction function) {
Log.i(TAG, "handler = submitFromWeb, data from web = " + data);
function.onCallBack("submitFromWeb exe, response data from Java");
function.onCallBack("submitFromWeb exe, response data 中文 from Java");
}

});
Expand All @@ -86,7 +86,7 @@ public void handler(String data, CallBackFunction function) {
Location location = new Location();
location.address = "SDU";
user.location = location;
user.name = "Bruce";
user.name = "大头鬼";

webView.callHandler("functionInJs", new Gson().toJson(user), new CallBackFunction() {
@Override
Expand Down

0 comments on commit 7b29385

Please sign in to comment.