You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by ha...@apache.org on 2018/02/27 05:50:45 UTC
incubator-weex-site git commit: fix the variable name in
extend-android.md
Repository: incubator-weex-site
Updated Branches:
refs/heads/master c7bf76228 -> 63bf58daa
fix the variable name in extend-android.md
close #72
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex-site/commit/63bf58da
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex-site/tree/63bf58da
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex-site/diff/63bf58da
Branch: refs/heads/master
Commit: 63bf58daac722b50ff969f4b73da9a0025cf4450
Parents: c7bf762
Author: Hanks <zh...@gmail.com>
Authored: Tue Feb 27 13:50:31 2018 +0800
Committer: Hanks <zh...@gmail.com>
Committed: Tue Feb 27 13:50:31 2018 +0800
----------------------------------------------------------------------
source/cn/guide/extend-android.md | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/63bf58da/source/cn/guide/extend-android.md
----------------------------------------------------------------------
diff --git a/source/cn/guide/extend-android.md b/source/cn/guide/extend-android.md
index bae1ca0..ca4daff 100644
--- a/source/cn/guide/extend-android.md
+++ b/source/cn/guide/extend-android.md
@@ -27,15 +27,15 @@ Weex 提供了扩展机制,可以根据自己的业务进行定制自己的功
示例如下:
```java
-public class MyModule extends WXModule{
+public class MyModule extends WXModule {
- //run ui thread
+ //run ui thread
@JSMethod (uiThread = true)
public void printLog(String msg) {
Toast.makeText(mWXSDKInstance.getContext(),msg,Toast.LENGTH_SHORT).show();
}
- //run JS thread
+ //run JS thread
@JSMethod (uiThread = false)
public void fireEventSyncCall(){
//implement your module logic here
@@ -45,7 +45,7 @@ public class MyModule extends WXModule{
Register the module
```java
-WXSDKEngine.registerModule("MyModule", WXEventModule.class);
+WXSDKEngine.registerModule("MyModule", MyModule.class);
```
JS 调用如下: