You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@weex.apache.org by cxfeng1 <gi...@git.apache.org> on 2018/01/17 12:53:23 UTC

[GitHub] incubator-weex-site pull request #15: * [doc] update the document of extend-...

Github user cxfeng1 commented on a diff in the pull request:

    https://github.com/apache/incubator-weex-site/pull/15#discussion_r162040271
  
    --- Diff: source/guide/extend-android.md ---
    @@ -5,70 +5,63 @@ group: Extend
     order: 6.3
     version: 2.1
     ---
    +# Android extend
    +  Weex provides an easy way to extend, as module-extend、component-extend and adapter-extend.
     
     ## Module extend
     
    -weex sdk support Module extend, Weex SDK provides only rendering capabilities, rather than have other capabilities, such as network, picture, and URL redirection. If you want the these features, you need to implement it.
    -
    -For example: If you want to implement an address jumping function, you can achieve a Module Follow the steps below.
    -
    -### Step to customize a module
    -
    -- Customize module must extend WXModule
    -- @WXModuleAnno annotation must be added, as it is the only the way to recognized by Weex
    -- The access levels of mehtod must be **public**
    -- The module class also can not be an inner class
    -- Customize can not be obfuscated by tools like ProGuard
    -- Module methods will be invoked in UI thread, do not put time consuming operation there
    -- Weex params can be int, double, float, String, Map, List
    +1. Customize module class must extends WXModule. 
    +2. Extended method must add `@JSMethod (uiThread = false or true)` annotation, and you can set the method whether it is running on UI thread or not.
    --- End diff --
    
    Extended method must add `@JSMethod (uiThread = false or true)` annotation,  which determines whether the method is run on UI thread.


---