+ [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/0.16-dev Commit: 3b9b5a54258a753ac3cc5337cb2ae360b4095e6e Parents: b397774 Author: misakuo <misa...@apache.org> Authored: Mon Jul 17 10:51:44 2017 +0800 Committer: misakuo <misa...@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`.