You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by zs...@apache.org on 2017/08/01 02:29:50 UTC

[41/50] [abbrv] incubator-weex git commit: + [doc] update doc for proguard rules

+ [doc] update doc for proguard rules


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/3b9b5a54
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/3b9b5a54
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/3b9b5a54

Branch: refs/heads/master
Commit: 3b9b5a54258a753ac3cc5337cb2ae360b4095e6e
Parents: b397774
Author: misakuo <mi...@apache.org>
Authored: Mon Jul 17 10:51:44 2017 +0800
Committer: misakuo <mi...@apache.org>
Committed: Mon Jul 17 10:51:44 2017 +0800

----------------------------------------------------------------------
 .../cn/references/advanced/extend-to-android.md      | 15 ++++++++++++++-
 doc/source/cn/references/components/image.md         |  2 +-
 doc/source/cn/references/components/list.md          |  6 +-----
 doc/source/references/advanced/extend-to-android.md  | 14 ++++++++++++++
 doc/source/references/components/image.md            |  2 +-
 5 files changed, 31 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/3b9b5a54/doc/source/cn/references/advanced/extend-to-android.md
----------------------------------------------------------------------
diff --git a/doc/source/cn/references/advanced/extend-to-android.md b/doc/source/cn/references/advanced/extend-to-android.md
index e2d654c..61a5bbf 100644
--- a/doc/source/cn/references/advanced/extend-to-android.md
+++ b/doc/source/cn/references/advanced/extend-to-android.md
@@ -185,4 +185,17 @@ public class ImageAdapter implements IWXImgLoaderAdapter {
 	</script>
 	```
 
-注:工程要添加依赖 `compile 'com.squareup.picasso:picasso:2.5.2'`
\ No newline at end of file
+注:工程要添加依赖 `compile 'com.squareup.picasso:picasso:2.5.2'`
+
+#### SDK混淆规则
+若要在APP中使用混淆,请在相应的配置文件中添加如下规则:
+
+```java
+-keep class com.taobao.weex.WXDebugTool{*;}
+-keep class com.taobao.weex.devtools.common.LogUtil{*;}
+-keep public class * extends com.taobao.weex.ui.component.WXComponent{*;}
+-keep public class * extends com.taobao.weex.common.WXModule{*;}
+-keepclassmembers class ** {
+  @com.taobao.weex.ui.component.WXComponentProp public *;
+}
+```
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/3b9b5a54/doc/source/cn/references/components/image.md
----------------------------------------------------------------------
diff --git a/doc/source/cn/references/components/image.md b/doc/source/cn/references/components/image.md
index 7755618..bc675cb 100644
--- a/doc/source/cn/references/components/image.md
+++ b/doc/source/cn/references/components/image.md
@@ -82,7 +82,7 @@ version: 2.1
 
 ## 事件
 
-- `load`: <sup class="api-version">v0.8+</sup>:当图片加载完成时触发。目前在 Android、iOS 上支持,H5 暂不支持。[示例](http://dotwe.org/vue/98ee340348d7cc3e6fbfe68dbaef1eed)
+- `load`: <sup class="api-version">v0.8+</sup>:当图片加载完成时触发。目前在 Android、iOS 上支持,H5 暂不支持。[示例](http://dotwe.org/vue/e291159ac60b35dcd4994638a78d54ad)
 
   - 事件对象
     - `success`: 当图片成功加载时为`true`,否则为`false`

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/3b9b5a54/doc/source/cn/references/components/list.md
----------------------------------------------------------------------
diff --git a/doc/source/cn/references/components/list.md b/doc/source/cn/references/components/list.md
index be14d06..8e1e63c 100644
--- a/doc/source/cn/references/components/list.md
+++ b/doc/source/cn/references/components/list.md
@@ -62,7 +62,7 @@ version: 2.1
 ## 事件
 
 - `loadmore` <sup class="wx-v">0.5+</sup>:如果列表滚动到底部将会立即触发这个事件,你可以在这个事件的处理函数中加载下一页的列表项。
-- `onscroll` <sup class="wx-v">0.11+</sup>: 列表发生滚动时将会触发该事件,事件的默认抽样率为10px,即列表每滚动10px触发一次,可通过属性`offset-accuracy`设置抽样率。    
+- `scroll` <sup class="wx-v">0.11+</sup>: 列表发生滚动时将会触发该事件,事件的默认抽样率为10px,即列表每滚动10px触发一次,可通过属性`offset-accuracy`设置抽样率。    
 
   事件中 event 对象属性:
   - `contentSize {Object}`:列表的内容尺寸
@@ -74,10 +74,6 @@ version: 2.1
 
   [体验一下](http://dotwe.org/bc445ede8746a31360e3607d210304c5)
 
-- `scroll` <sup class="wx-v">0.12+</sup>:列表滚动时触发这个事件。此事件回调中会给出当前`contentOffset`值。参见 [scroll event demo](http://dotwe.org/vue/9ef0e52bacaa20182a693f2187d851aa)。
-
-  [体验一下](http://dotwe.org/weex/7ba3b6222d912b4b0b4aafb8248ca22f)
-
 - 通用事件
 
   支持所有通用事件:

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/3b9b5a54/doc/source/references/advanced/extend-to-android.md
----------------------------------------------------------------------
diff --git a/doc/source/references/advanced/extend-to-android.md b/doc/source/references/advanced/extend-to-android.md
index e10b906..2ec4bc5 100644
--- a/doc/source/references/advanced/extend-to-android.md
+++ b/doc/source/references/advanced/extend-to-android.md
@@ -203,3 +203,17 @@ public class ImageAdapter implements IWXImgLoaderAdapter {
   }
 </script>
 ``` 
+
+#### Proguard Rules
+
+If you want to using proguard to protect your source code, please add the following rules to your profile:
+
+```java
+-keep class com.taobao.weex.WXDebugTool{*;}
+-keep class com.taobao.weex.devtools.common.LogUtil{*;}
+-keep public class * extends com.taobao.weex.ui.component.WXComponent{*;}
+-keep public class * extends com.taobao.weex.common.WXModule{*;}
+-keepclassmembers class ** {
+  @com.taobao.weex.ui.component.WXComponentProp public *;
+}
+```

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/3b9b5a54/doc/source/references/components/image.md
----------------------------------------------------------------------
diff --git a/doc/source/references/components/image.md b/doc/source/references/components/image.md
index aac1735..cd8c59b 100644
--- a/doc/source/references/components/image.md
+++ b/doc/source/references/components/image.md
@@ -42,7 +42,7 @@ This component supports no child components.
 
 - support `click` event. Check out [common events](../common-event.html)
 - support `appear` / `disappear` event. Check out [common events](../common-event.html)    
-- `load`<sup class="api-version">v0.8+</sup> event. The `load` event fires on an image has been loaded. Only Android and iOS are supported currently. [example](http://dotwe.org/vue/98ee340348d7cc3e6fbfe68dbaef1eed)    
+- `load`<sup class="api-version">v0.8+</sup> event. The `load` event fires on an image has been loaded. Only Android and iOS are supported currently. [example](http://dotwe.org/vue/e291159ac60b35dcd4994638a78d54ad)    
   - event object
     - `success` : `true` if the image was loaded successfully, otherwise `false`
     - `size` : the original size of image, contains two parameters: `naturalWidth` representing the original width of image in pixels, `naturalHeight` representing the original height of image in pixels. default value. The default value for both parameters is `0`.