incubator-weex git commit: * [android] fix setSize when defaultHeight is use screen height

2017-04-05 Thread kyork
Repository: incubator-weex
Updated Branches:
  refs/heads/0.11-dev a7c108e18 -> 4a5f87746


* [android] fix setSize when defaultHeight is use screen height


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

Branch: refs/heads/0.11-dev
Commit: 4a5f87746e5686fc9bcf4fbe2c59b379db212f3e
Parents: a7c108e
Author: sospartan 
Authored: Wed Apr 5 17:01:29 2017 +0800
Committer: sospartan 
Committed: Wed Apr 5 17:01:29 2017 +0800

--
 android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/4a5f8774/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
--
diff --git a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java 
b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
index 0131363..284dad3 100755
--- a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
+++ b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
@@ -1286,10 +1286,7 @@ public class WXSDKInstance implements 
IWXActivityStateListener,DomContext, View.
   public void onRootCreated(WXComponent root) {
 this.mRootComp = root;
 mRenderContainer.addView(root.getHostView());
-if(root.getDomObject().getStyles().getDefaultHeight() == 0
-|| root.getDomObject().getStyles().getDefaultWidth() ==0){
-  setSize(mRenderContainer.getWidth(),mRenderContainer.getHeight());
-}
+setSize(mRenderContainer.getWidth(),mRenderContainer.getHeight());
   }
 
   /**



incubator-weex git commit: * [android] Change compiling error due to enableLayerType

2017-04-11 Thread kyork
Repository: incubator-weex
Updated Branches:
  refs/heads/0.12-dev b75c6c56f -> 4c9e195f5


* [android] Change compiling error due to enableLayerType


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

Branch: refs/heads/0.12-dev
Commit: 4c9e195f5c7717edd42071f8cc96e3456a972bff
Parents: b75c6c5
Author: YorkShen 
Authored: Wed Apr 12 10:48:09 2017 +0800
Committer: YorkShen 
Committed: Wed Apr 12 10:48:09 2017 +0800

--
 .../main/java/com/taobao/weex/dom/action/AnimationAction.java| 2 +-
 .../src/main/java/com/taobao/weex/ui/component/WXComponent.java  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/4c9e195f/android/sdk/src/main/java/com/taobao/weex/dom/action/AnimationAction.java
--
diff --git 
a/android/sdk/src/main/java/com/taobao/weex/dom/action/AnimationAction.java 
b/android/sdk/src/main/java/com/taobao/weex/dom/action/AnimationAction.java
index 1350ead..5b380f2 100644
--- a/android/sdk/src/main/java/com/taobao/weex/dom/action/AnimationAction.java
+++ b/android/sdk/src/main/java/com/taobao/weex/dom/action/AnimationAction.java
@@ -143,7 +143,7 @@ class AnimationAction implements DOMAction, RenderAction {
   if (animator != null) {
 Animator.AnimatorListener animatorCallback = 
createAnimatorListener(instance, callback);
 if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR2 && 
component
-.enableLayerType() ) {
+.isLayerTypeEnabled() ) {
   component.getHostView().setLayerType(View.LAYER_TYPE_HARDWARE, 
null);
 }
 Interpolator interpolator = createTimeInterpolator();

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/4c9e195f/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
--
diff --git 
a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java 
b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
index e1b8e3b..52cad7c 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
@@ -1059,7 +1059,7 @@ public abstract class  WXComponent 
implements IWXObject, IWXActi
   }
 
   public void setOpacity(float opacity) {
-if (opacity >= 0 && opacity <= 1 && mHost.getAlpha() != opacity && 
enableLayerType()) {
+if (opacity >= 0 && opacity <= 1 && mHost.getAlpha() != opacity && 
isLayerTypeEnabled()) {
   mHost.setLayerType(View.LAYER_TYPE_HARDWARE, null);
   mHost.setAlpha(opacity);
 }
@@ -1247,7 +1247,7 @@ public abstract class  WXComponent 
implements IWXObject, IWXActi
 if (WXEnvironment.isApkDebugable() && !WXUtils.isUiThread()) {
   throw new WXRuntimeException("[WXComponent] destroy can only be called 
in main thread");
 }
-if(mHost!= null && mHost.getLayerType()==View.LAYER_TYPE_HARDWARE && 
enableLayerType()) {
+if(mHost!= null && mHost.getLayerType()==View.LAYER_TYPE_HARDWARE && 
isLayerTypeEnabled()) {
   mHost.setLayerType(View.LAYER_TYPE_NONE, null);
 }
 removeAllEvent();



[2/2] incubator-weex git commit: Merge branch 'doc-toast' of https://github.com/YorkShen/incubator-weex into 0.12-dev

2017-04-11 Thread kyork
Merge branch 'doc-toast' of https://github.com/YorkShen/incubator-weex into 
0.12-dev


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

Branch: refs/heads/0.12-dev
Commit: b75c6c56ff3ae95a4b11ee51c924484e98462543
Parents: 476e58c 5166b33
Author: YorkShen 
Authored: Wed Apr 12 10:42:45 2017 +0800
Committer: YorkShen 
Committed: Wed Apr 12 10:42:45 2017 +0800

--
 doc/source/cn/references/modules/modal.md | 2 ++
 doc/source/references/modules/modal.md| 2 ++
 2 files changed, 4 insertions(+)
--




[3/3] incubator-weex git commit: Merge branch 'android-feature-disable-layerType' of https://github.com/YorkShen/incubator-weex into 0.12-dev

2017-04-11 Thread kyork
Merge branch 'android-feature-disable-layerType' of 
https://github.com/YorkShen/incubator-weex into 0.12-dev


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

Branch: refs/heads/0.12-dev
Commit: 476e58c9a5b5ce749494a3afbe1a15ad343b3c25
Parents: 02487c9 28dac6d
Author: YorkShen 
Authored: Wed Apr 12 10:41:27 2017 +0800
Committer: YorkShen 
Committed: Wed Apr 12 10:41:27 2017 +0800

--
 .../java/com/taobao/weex/WXSDKInstance.java | 25 
 .../taobao/weex/dom/action/AnimationAction.java |  3 ++-
 .../taobao/weex/ui/component/WXComponent.java   | 14 ---
 3 files changed, 38 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/476e58c9/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
--
diff --cc android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
index d10a394,51903ea..b7aea32
mode 100644,100755..100644
--- a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
+++ b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/476e58c9/android/sdk/src/main/java/com/taobao/weex/dom/action/AnimationAction.java
--

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/476e58c9/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
--
diff --cc 
android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
index 42d9573,7b9bca1..e1b8e3b
mode 100644,100755..100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java



[1/3] incubator-weex git commit: * [Android] Add the ability of disable changing layerType

2017-04-11 Thread kyork
Repository: incubator-weex
Updated Branches:
  refs/heads/0.12-dev 02487c9c8 -> 476e58c9a


* [Android] Add the ability of disable changing layerType

For certain custom weex instance, one can disable the ability of changing 
layerType by call WXSDKInstance.enableLayerType(boolean). The default value for 
this flag is true and setting this to false will have performance punishment


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

Branch: refs/heads/0.12-dev
Commit: 8e51cef1b0e4de454c7920632e0d64b60e8fa6d4
Parents: a6207a6
Author: YorkShen 
Authored: Wed Mar 22 11:45:55 2017 +0800
Committer: YorkShen 
Committed: Wed Mar 22 11:45:55 2017 +0800

--
 .../java/com/taobao/weex/WXSDKInstance.java | 25 
 .../taobao/weex/dom/action/AnimationAction.java |  3 ++-
 .../taobao/weex/ui/component/WXComponent.java   | 15 
 3 files changed, 38 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/8e51cef1/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
--
diff --git a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java 
b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
index eb0653f..51903ea 100755
--- a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
+++ b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
@@ -208,6 +208,7 @@ import android.content.Context;
 import android.content.Intent;
 import android.content.IntentFilter;
 import android.graphics.Color;
+import android.graphics.Paint;
 import android.net.Uri;
 import android.os.Message;
 import android.support.annotation.Nullable;
@@ -293,6 +294,7 @@ public class WXSDKInstance implements 
IWXActivityStateListener,DomContext, View.
   private boolean isCommit=false;
   private WXGlobalEventReceiver mGlobalEventReceiver=null;
   private boolean trackComponent;
+  private boolean enableLayerType = true;
   private boolean mNeedValidate = false;
   private static volatile int mViewPortWidth = 750;
   private int mInstanceViewPortWidth = 750;
@@ -340,6 +342,29 @@ public class WXSDKInstance implements 
IWXActivityStateListener,DomContext, View.
 this.trackComponent = trackComponent;
   }
 
+  /**
+   * Tell whether it is enabled to change the layerType
+   * {@link android.view.View#setLayerType(int, Paint)}
+   * @return True for enable to change the layerType of component, false 
otherwise. The default
+   * is True
+   */
+  public boolean isLayerTypeEnabled() {
+return enableLayerType;
+  }
+
+  /**
+   * Enable the ability of changing layerType. e.g. {@link 
android.view.View#setLayerType(int, Paint)}
+   * Disable the ability of changing layerType will have tremendous 
performance
+   * punishment.
+   *
+   * Do not set this to false unless you know exactly what 
you are doing.
+   * @param enable True for enable to change the layerType of component, false 
otherwise. The default
+   * is True
+   */
+  public void enableLayerType(boolean enable) {
+enableLayerType = enable;
+  }
+
   public boolean isNeedValidate() {
 return mNeedValidate;
   }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/8e51cef1/android/sdk/src/main/java/com/taobao/weex/dom/action/AnimationAction.java
--
diff --git 
a/android/sdk/src/main/java/com/taobao/weex/dom/action/AnimationAction.java 
b/android/sdk/src/main/java/com/taobao/weex/dom/action/AnimationAction.java
index 9768016..d85d997 100644
--- a/android/sdk/src/main/java/com/taobao/weex/dom/action/AnimationAction.java
+++ b/android/sdk/src/main/java/com/taobao/weex/dom/action/AnimationAction.java
@@ -328,7 +328,8 @@ class AnimationAction implements DOMAction, RenderAction {
   .getInstanceViewPortWidth());
   if (animator != null) {
 Animator.AnimatorListener animatorCallback = 
createAnimatorListener(instance, callback);
-if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR2) {
+if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR2 && 
component
+.enableLayerType() ) {
   component.getHostView().setLayerType(View.LAYER_TYPE_HARDWARE, 
null);
 }
 Interpolator interpolator = createTimeInterpolator();

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/8e51cef1/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java

[2/3] incubator-weex git commit: * [android] Fix layerType name in WXComponent

2017-04-11 Thread kyork
* [android] Fix layerType name in WXComponent


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

Branch: refs/heads/0.12-dev
Commit: 28dac6df7c95554c2fde4c706bc627c597e8c338
Parents: 8e51cef
Author: YorkShen 
Authored: Wed Apr 12 10:34:28 2017 +0800
Committer: YorkShen 
Committed: Wed Apr 12 10:34:28 2017 +0800

--
 .../src/main/java/com/taobao/weex/ui/component/WXComponent.java| 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dac6df/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
--
diff --git 
a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java 
b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
index c1c99bc..7b9bca1 100755
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
@@ -1510,7 +1510,7 @@ public abstract class  WXComponent 
implements IWXObject, IWXActi
* For now, this method respect the result of {@link 
WXSDKInstance#isLayerTypeEnabled()}
* @return Refer {@link WXSDKInstance#isLayerTypeEnabled()}
*/
-  public boolean enableLayerType() {
+  public boolean isLayerTypeEnabled() {
 return getInstance().isLayerTypeEnabled();
   }
 }
\ No newline at end of file



incubator-weex git commit: * [Android] Fix License of IRenderResult

2017-04-12 Thread kyork
Repository: incubator-weex
Updated Branches:
  refs/heads/0.12-dev 2ee570a30 -> c22d8e4b8


* [Android] Fix License of IRenderResult


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

Branch: refs/heads/0.12-dev
Commit: c22d8e4b8932f527f1746f9fef0acd8cb52f45ae
Parents: 2ee570a
Author: YorkShen 
Authored: Wed Apr 12 15:22:29 2017 +0800
Committer: YorkShen 
Committed: Wed Apr 12 15:22:29 2017 +0800

--
 .../com/taobao/weex/ui/view/IRenderResult.java  | 221 ++-
 1 file changed, 17 insertions(+), 204 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/c22d8e4b/android/sdk/src/main/java/com/taobao/weex/ui/view/IRenderResult.java
--
diff --git 
a/android/sdk/src/main/java/com/taobao/weex/ui/view/IRenderResult.java 
b/android/sdk/src/main/java/com/taobao/weex/ui/view/IRenderResult.java
index 95b56a5..dab1106 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/view/IRenderResult.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/view/IRenderResult.java
@@ -1,208 +1,21 @@
-/*
- *
- *  Apache License
- *Version 2.0, January 2004
- * http://www.apache.org/licenses/
- *
- *TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
- *
- *1. Definitions.
- *
- *   "License" shall mean the terms and conditions for use, reproduction,
- *   and distribution as defined by Sections 1 through 9 of this document.
- *
- *   "Licensor" shall mean the copyright owner or entity authorized by
- *   the copyright owner that is granting the License.
- *
- *   "Legal Entity" shall mean the union of the acting entity and all
- *   other entities that control, are controlled by, or are under common
- *   control with that entity. For the purposes of this definition,
- *   "control" means (i) the power, direct or indirect, to cause the
- *   direction or management of such entity, whether by contract or
- *   otherwise, or (ii) ownership of fifty percent (50%) or more of the
- *   outstanding shares, or (iii) beneficial ownership of such entity.
- *
- *   "You" (or "Your") shall mean an individual or Legal Entity
- *   exercising permissions granted by this License.
- *
- *   "Source" form shall mean the preferred form for making modifications,
- *   including but not limited to software source code, documentation
- *   source, and configuration files.
- *
- *   "Object" form shall mean any form resulting from mechanical
- *   transformation or translation of a Source form, including but
- *   not limited to compiled object code, generated documentation,
- *   and conversions to other media types.
- *
- *   "Work" shall mean the work of authorship, whether in Source or
- *   Object form, made available under the License, as indicated by a
- *   copyright notice that is included in or attached to the work
- *   (an example is provided in the Appendix below).
- *
- *   "Derivative Works" shall mean any work, whether in Source or Object
- *   form, that is based on (or derived from) the Work and for which the
- *   editorial revisions, annotations, elaborations, or other modifications
- *   represent, as a whole, an original work of authorship. For the 
purposes
- *   of this License, Derivative Works shall not include works that remain
- *   separable from, or merely link (or bind by name) to the interfaces of,
- *   the Work and Derivative Works thereof.
- *
- *   "Contribution" shall mean any work of authorship, including
- *   the original version of the Work and any modifications or additions
- *   to that Work or Derivative Works thereof, that is intentionally
- *   submitted to Licensor for inclusion in the Work by the copyright owner
- *   or by an individual or Legal Entity authorized to submit on behalf of
- *   the copyright owner. For the purposes of this definition, "submitted"
- *   means any form of electronic, verbal, or written communication sent
- *   to the Licensor or its representatives, including but not limited to
- *   communication on electronic mailing lists, source code control 
systems,
- *   and issue tracking systems that are managed by, or on behalf of, the
- *   Licensor for the purpose of discussing and improving the Work, but
- *   excluding communication that is conspicuously marked or otherwise
- *   

[4/4] incubator-weex git commit: Merge branch '0.11-dev-bugfix' of https://github.com/xkli/incubator-weex into 0.11-dev

2017-04-10 Thread kyork
Merge branch '0.11-dev-bugfix' of https://github.com/xkli/incubator-weex into 
0.11-dev


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

Branch: refs/heads/0.11-dev
Commit: 9d8f242eb9001e7d8e952b437ceb23056f42efdd
Parents: 9afe27b 3aa61a5
Author: YorkShen 
Authored: Mon Apr 10 15:35:28 2017 +0800
Committer: YorkShen 
Committed: Mon Apr 10 15:35:28 2017 +0800

--
 .../java/com/taobao/weex/WXSDKInstance.java |  4 +-
 .../appfram/navigator/WXNavigatorModule.java|  4 +-
 .../com/taobao/weex/ui/component/WXEmbed.java   | 40 
 3 files changed, 44 insertions(+), 4 deletions(-)
--




[1/4] incubator-weex git commit: * [android] update Empty pointers to judge

2017-04-10 Thread kyork
Repository: incubator-weex
Updated Branches:
  refs/heads/0.11-dev 9afe27b96 -> 9d8f242eb


* [android] update Empty pointers to judge


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

Branch: refs/heads/0.11-dev
Commit: 021faa65c768726b03650a67836db3477bebe33a
Parents: 83a2b46
Author: xkli <569664...@qq.com>
Authored: Fri Apr 7 11:07:16 2017 +0800
Committer: xkli <569664...@qq.com>
Committed: Fri Apr 7 11:07:16 2017 +0800

--
 android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/021faa65/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
--
diff --git a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java 
b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
index 284dad3..0495195 100755
--- a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
+++ b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
@@ -1589,7 +1589,9 @@ public class WXSDKInstance implements 
IWXActivityStateListener,DomContext, View.
   }else {
 performance.errCode=WXErrorCode.WX_SUCCESS.getErrorCode();
   }
-  
mUserTrackAdapter.commit(getContext(),null,IWXUserTrackAdapter.JS_DOWNLOAD,performance,null);
+  if (mUserTrackAdapter != null) {
+mUserTrackAdapter.commit(getContext(), null, 
IWXUserTrackAdapter.JS_DOWNLOAD, performance, null);
+  }
 }
   }
   WXLogUtils.renderPerformanceLog("networkTime", 
mWXPerformance.networkTime);



[3/4] incubator-weex git commit: * [android] update NavigatorModule add judge callback

2017-04-10 Thread kyork
* [android] update NavigatorModule add judge callback


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

Branch: refs/heads/0.11-dev
Commit: 3aa61a56806d23815d9641385e0818a0ae6a9639
Parents: 0c36a80
Author: xkli <569664...@qq.com>
Authored: Mon Apr 10 15:05:37 2017 +0800
Committer: xkli <569664...@qq.com>
Committed: Mon Apr 10 15:05:37 2017 +0800

--
 .../com/taobao/weex/appfram/navigator/WXNavigatorModule.java | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/3aa61a56/android/sdk/src/main/java/com/taobao/weex/appfram/navigator/WXNavigatorModule.java
--
diff --git 
a/android/sdk/src/main/java/com/taobao/weex/appfram/navigator/WXNavigatorModule.java
 
b/android/sdk/src/main/java/com/taobao/weex/appfram/navigator/WXNavigatorModule.java
index 65ad86f..6c9c4f7 100755
--- 
a/android/sdk/src/main/java/com/taobao/weex/appfram/navigator/WXNavigatorModule.java
+++ 
b/android/sdk/src/main/java/com/taobao/weex/appfram/navigator/WXNavigatorModule.java
@@ -232,9 +232,7 @@ public class WXNavigatorModule extends WXModule {
 callback.invoke(MSG_FAILED);
 }
 }
-}
-
-if (callback != null) {
+} else if (callback != null) {
 callback.invoke(MSG_FAILED);
 }
 }



[2/4] incubator-weex git commit: * [android] update embed support activity lifecycle

2017-04-10 Thread kyork
* [android] update embed support activity lifecycle


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

Branch: refs/heads/0.11-dev
Commit: 0c36a80c8a118878377037584399f849ba520976
Parents: 021faa6
Author: xkli <569664...@qq.com>
Authored: Mon Apr 10 14:57:10 2017 +0800
Committer: xkli <569664...@qq.com>
Committed: Mon Apr 10 14:57:10 2017 +0800

--
 .../com/taobao/weex/ui/component/WXEmbed.java   | 40 
 1 file changed, 40 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/0c36a80c/android/sdk/src/main/java/com/taobao/weex/ui/component/WXEmbed.java
--
diff --git 
a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXEmbed.java 
b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXEmbed.java
index 01bf99d..bb1966b 100755
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXEmbed.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXEmbed.java
@@ -517,4 +517,44 @@ public class WXEmbed extends WXDiv implements 
WXSDKInstance.OnInstanceVisibleLis
 comp.fireEvent(Constants.Event.VIEWDISAPPEAR);
 }
   }
+
+  @Override
+  public void onActivityStart() {
+super.onActivityStart();
+if (mNestedInstance != null) {
+  mNestedInstance.onActivityStart();
+}
+  }
+
+  @Override
+  public void onActivityResume() {
+super.onActivityResume();
+if (mNestedInstance != null) {
+  mNestedInstance.onActivityResume();
+}
+  }
+
+  @Override
+  public void onActivityPause() {
+super.onActivityPause();
+if (mNestedInstance != null) {
+  mNestedInstance.onActivityPause();
+}
+  }
+
+  @Override
+  public void onActivityStop() {
+super.onActivityStop();
+if (mNestedInstance != null) {
+  mNestedInstance.onActivityStop();
+}
+  }
+
+  @Override
+  public void onActivityDestroy() {
+super.onActivityDestroy();
+if (mNestedInstance != null) {
+  mNestedInstance.onActivityDestroy();
+}
+  }
 }
\ No newline at end of file



[2/2] incubator-weex git commit: Merge branch '0.12-fix-one-event' of https://github.com/sospartan/incubator-weex into 0.12-dev

2017-04-09 Thread kyork
Merge branch '0.12-fix-one-event' of 
https://github.com/sospartan/incubator-weex into 0.12-dev


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

Branch: refs/heads/0.12-dev
Commit: 43eb4dfcd0f7cc7de0bc891878d30e0c79ee04db
Parents: 6e4dcfb 36a8b88
Author: YorkShen 
Authored: Mon Apr 10 10:20:38 2017 +0800
Committer: YorkShen 
Committed: Mon Apr 10 10:20:38 2017 +0800

--
 .../com/taobao/weex/ui/component/WXComponent.java |  4 
 .../com/taobao/weex/ui/view/gesture/WXGesture.java| 14 ++
 2 files changed, 18 insertions(+)
--




[1/2] incubator-weex git commit: * [android] disable click event when gesture already consume touch event

2017-04-09 Thread kyork
Repository: incubator-weex
Updated Branches:
  refs/heads/0.12-dev 6e4dcfb96 -> 43eb4dfcd


* [android] disable click event when gesture already consume touch event


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

Branch: refs/heads/0.12-dev
Commit: 36a8b8805a49bdb4252e10795326d67d73d3daca
Parents: 41c8ef6
Author: sospartan 
Authored: Thu Apr 6 15:03:11 2017 +0800
Committer: sospartan 
Committed: Thu Apr 6 15:03:11 2017 +0800

--
 .../com/taobao/weex/ui/component/WXComponent.java |  4 
 .../com/taobao/weex/ui/view/gesture/WXGesture.java| 14 ++
 2 files changed, 18 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/36a8b880/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
--
diff --git 
a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java 
b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
index 44e6c23..4c0a9a7 100755
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
@@ -422,6 +422,10 @@ public abstract class  WXComponent 
implements IWXObject, IWXActi
 view.setOnClickListener(new View.OnClickListener() {
   @Override
   public void onClick(View v) {
+if(mGesture != null && mGesture.isTouchEventConsumed()){
+  //event is already consumed by gesture
+  return;
+}
 for (OnClickListener listener : mHostClickListeners){
   if(listener != null) {
 listener.onHostViewClick();

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/36a8b880/android/sdk/src/main/java/com/taobao/weex/ui/view/gesture/WXGesture.java
--
diff --git 
a/android/sdk/src/main/java/com/taobao/weex/ui/view/gesture/WXGesture.java 
b/android/sdk/src/main/java/com/taobao/weex/ui/view/gesture/WXGesture.java
index 95bb112..05b9c9d 100755
--- a/android/sdk/src/main/java/com/taobao/weex/ui/view/gesture/WXGesture.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/view/gesture/WXGesture.java
@@ -256,6 +256,7 @@ public class WXGesture extends 
GestureDetector.SimpleOnGestureListener implement
   private WXGestureType mPendingPan = null;//event type to notify when 
action_up or action_cancel
   private int mParentOrientation =-1;
   private boolean mIsPreventMoveEvent = false;
+  private boolean mIsTouchEventConsumed = false; //Reset to false when first 
touch event, set to true when gesture event fired.
 
   public WXGesture(WXComponent wxComponent, Context context) {
 this.component = wxComponent;
@@ -288,6 +289,15 @@ public class WXGesture extends 
GestureDetector.SimpleOnGestureListener implement
 mIsPreventMoveEvent = preventMoveEvent;
   }
 
+  /**
+   *
+   * @return true if current touch event is already consumed by gesture.
+   * Reset to false when next first touch event, set to true when gesture 
event fired.
+   */
+  public boolean isTouchEventConsumed(){
+return mIsTouchEventConsumed;
+  }
+
   @Override
   public boolean onTouch(View v, MotionEvent event) {
 try {
@@ -295,6 +305,7 @@ public class WXGesture extends 
GestureDetector.SimpleOnGestureListener implement
   switch (event.getActionMasked()) {
 case MotionEvent.ACTION_POINTER_DOWN:
 case MotionEvent.ACTION_DOWN:
+  mIsTouchEventConsumed = false;
   /**
* If component has same scroll orientation with it's parent and 
it's parent not scrollable
* , we should disallow parent in DOWN.
@@ -309,12 +320,14 @@ public class WXGesture extends 
GestureDetector.SimpleOnGestureListener implement
   break;
 case MotionEvent.ACTION_MOVE:
   result |= handleMotionEvent(LowLevelGesture.ACTION_MOVE, event);
+  mIsTouchEventConsumed = mIsTouchEventConsumed || result;
   break;
 case MotionEvent.ACTION_UP:
 case MotionEvent.ACTION_POINTER_UP:
   finishDisallowInterceptTouchEvent(v);
   result |= handleMotionEvent(LowLevelGesture.ACTION_UP, event);
   result |= handlePanMotionEvent(event);
+  mIsTouchEventConsumed = mIsTouchEventConsumed || result;
   break;
 case MotionEvent.ACTION_CANCEL:
   finishDisallowInterceptTouchEvent(v);
@@ -627,6 +640,7 @@ public class WXGesture extends 
GestureDetector.SimpleOnGestureListener 

[3/3] incubator-weex git commit: Merge branch '0.12-dev' of https://github.com/lycool/incubator-weex into 0.12-dev

2017-04-12 Thread kyork
Merge branch '0.12-dev' of https://github.com/lycool/incubator-weex into 
0.12-dev


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

Branch: refs/heads/0.12-dev
Commit: 73684e5a8b29ab61729f158aeb77cef44757c26e
Parents: cb5d6c3 043e632
Author: YorkShen 
Authored: Thu Apr 13 10:49:06 2017 +0800
Committer: YorkShen 
Committed: Thu Apr 13 10:49:06 2017 +0800

--
 android/sdk/libs/armeabi/libweexv8.so   | Bin 3563544 -> 3579944 bytes
 .../java/com/taobao/weex/WXSDKInstance.java |   8 
 .../java/com/taobao/weex/bridge/WXBridge.java   |   8 
 .../com/taobao/weex/bridge/WXBridgeManager.java |   8 ++--
 .../java/com/taobao/weex/common/IWXBridge.java  |   2 ++
 .../taobao/weex/bridge/WXWebsocketBridge.java   |   3 +++
 6 files changed, 27 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/73684e5a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
--
diff --cc android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
index b7aea32,8ffd2cf..007cfea
mode 100644,100755..100644
--- a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
+++ b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/73684e5a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridge.java
--
diff --cc android/sdk/src/main/java/com/taobao/weex/bridge/WXBridge.java
index d42839e,6389cbb..0a3582a
mode 100644,100755..100644
--- a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridge.java
+++ b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridge.java

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/73684e5a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java
--
diff --cc android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java
index e056663,997d127..de6f21d
mode 100644,100755..100644
--- a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java
+++ b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/73684e5a/android/sdk/src/main/java/com/taobao/weex/common/IWXBridge.java
--
diff --cc android/sdk/src/main/java/com/taobao/weex/common/IWXBridge.java
index 06b9827,9e7fc1b..a013767
mode 100644,100755..100644
--- a/android/sdk/src/main/java/com/taobao/weex/common/IWXBridge.java
+++ b/android/sdk/src/main/java/com/taobao/weex/common/IWXBridge.java

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/73684e5a/android/weex_debug/src/main/java/com/taobao/weex/bridge/WXWebsocketBridge.java
--
diff --cc 
android/weex_debug/src/main/java/com/taobao/weex/bridge/WXWebsocketBridge.java
index e89d0fe,f5d4329..c53db0f
mode 100644,100755..100644
--- 
a/android/weex_debug/src/main/java/com/taobao/weex/bridge/WXWebsocketBridge.java
+++ 
b/android/weex_debug/src/main/java/com/taobao/weex/bridge/WXWebsocketBridge.java



[2/3] incubator-weex git commit: remove some WXLogUtils.d statements

2017-04-12 Thread kyork
remove some WXLogUtils.d statements


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

Branch: refs/heads/0.12-dev
Commit: 043e632bd3fb88b1165581bd1de77e8ba8639c6f
Parents: 1ce2a63
Author: kaifeng.ly 
Authored: Tue Apr 11 16:21:56 2017 +0800
Committer: kaifeng.ly 
Committed: Tue Apr 11 16:21:56 2017 +0800

--
 .../src/main/java/com/taobao/weex/bridge/WXBridgeManager.java  | 6 --
 1 file changed, 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/043e632b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java
--
diff --git 
a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java 
b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java
index eba0abb..997d127 100755
--- a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java
+++ b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java
@@ -571,9 +571,6 @@ public class WXBridgeManager implements 
Callback,BactchExecutor {
   mLodBuilder.append("[WXBridgeManager] callNative  
instanceId:").append(instanceId)
   .append(", tasks:").append(tasks).append(", 
callback:").append(callback);
 
-  //WXLogUtils.d(mLodBuilder.substring(0));
-  WXLogUtils.d(mLodBuilder.toString());
-
   mLodBuilder.setLength(0);
 }
 
@@ -1073,9 +1070,6 @@ public class WXBridgeManager implements 
Callback,BactchExecutor {
   if(logTaskDetail)
 mLodBuilder.append(" 
tasks:").append(WXJsonUtils.fromObjectToJSONString(args));
 
-  //WXLogUtils.d(mLodBuilder.substring(0));
-  WXLogUtils.d(mLodBuilder.toString());
-
   mLodBuilder.setLength(0);
 }
 mWXBridge.execJS(instanceId, namespace, function, args);



[1/3] incubator-weex git commit: replace Java WxTimerModule with C++ setTimeout/setInterval implementation

2017-04-12 Thread kyork
Repository: incubator-weex
Updated Branches:
  refs/heads/0.12-dev cb5d6c33a -> 73684e5a8


replace Java WxTimerModule with C++ setTimeout/setInterval implementation


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

Branch: refs/heads/0.12-dev
Commit: 1ce2a638f887feeca2f5f5f8c89784e770f162fe
Parents: 86bacfb
Author: kaifeng.ly 
Authored: Fri Apr 7 14:34:32 2017 +0800
Committer: kaifeng.ly 
Committed: Fri Apr 7 14:34:32 2017 +0800

--
 android/sdk/libs/armeabi/libweexv8.so   | Bin 3563544 -> 3579944 bytes
 .../java/com/taobao/weex/WXSDKInstance.java |   8 
 .../java/com/taobao/weex/bridge/WXBridge.java   |   8 
 .../com/taobao/weex/bridge/WXBridgeManager.java |  14 --
 .../java/com/taobao/weex/common/IWXBridge.java  |   2 ++
 .../taobao/weex/bridge/WXWebsocketBridge.java   |   3 +++
 6 files changed, 33 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/1ce2a638/android/sdk/libs/armeabi/libweexv8.so
--
diff --git a/android/sdk/libs/armeabi/libweexv8.so 
b/android/sdk/libs/armeabi/libweexv8.so
index 471bb04..405be69 100755
Binary files a/android/sdk/libs/armeabi/libweexv8.so and 
b/android/sdk/libs/armeabi/libweexv8.so differ

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/1ce2a638/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
--
diff --git a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java 
b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
index ef29257..8ffd2cf 100755
--- a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
+++ b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
@@ -922,6 +922,7 @@ public class WXSDKInstance implements 
IWXActivityStateListener,DomContext, View.
   WXLogUtils.w("Warning :Component tree has not build completely, 
onActivityDestroy can not be call!");
 }
 
+destroyUnhandledTimer();
 destroy();
   }
 
@@ -1270,6 +1271,13 @@ public class WXSDKInstance implements 
IWXActivityStateListener,DomContext, View.
 }
   }
 
+  /**
+   * destroy all unhandled c++ setTimeout/setInterval callback
+   */
+  public void destroyUnhandledTimer(){
+WXBridgeManager.getInstance().clearInstanceCallback(mInstanceId);
+  }
+
   public synchronized void destroy() {
 WXSDKManager.getInstance().destroyInstance(mInstanceId);
 WXComponentFactory.removeComponentTypesByInstanceId(getInstanceId());

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/1ce2a638/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridge.java
--
diff --git a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridge.java 
b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridge.java
index 7172c11..6389cbb 100755
--- a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridge.java
+++ b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridge.java
@@ -254,6 +254,14 @@ class WXBridge implements IWXBridge {
*/
   public native void takeHeapSnapshot(String filename);
 
+
+  /**
+   * Called to clear all unhandled c++ timer when an instance is
+   * destroyed
+   * @param instanceId the destoyed instance's id.
+   */
+  public native void clearInstanceCallback(String instanceId);
+
   /**
* JavaScript uses this methods to call Android code
*

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/1ce2a638/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java
--
diff --git 
a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java 
b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java
index b890352..eba0abb 100755
--- a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java
+++ b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java
@@ -570,7 +570,10 @@ public class WXBridgeManager implements 
Callback,BactchExecutor {
 if (WXEnvironment.isApkDebugable()) {
   mLodBuilder.append("[WXBridgeManager] callNative  
instanceId:").append(instanceId)
   .append(", tasks:").append(tasks).append(", 
callback:").append(callback);
-  WXLogUtils.d(mLodBuilder.substring(0));
+
+  //WXLogUtils.d(mLodBuilder.substring(0));
+  WXLogUtils.d(mLodBuilder.toString());
+
   mLodBuilder.setLength(0);
 }
 
@@ -1069,7 +1072,10 @@ 

incubator-weex git commit: * [android] Add dom for simpleList.

2017-04-14 Thread kyork
Repository: incubator-weex
Updated Branches:
  refs/heads/0.12-dev 413933744 -> 2f8eec623


* [android] Add dom for simpleList.


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

Branch: refs/heads/0.12-dev
Commit: 2f8eec623565306ddf6cfa3ffcf7b2ccf1ebf5b6
Parents: 4139337
Author: YorkShen 
Authored: Fri Apr 14 18:54:56 2017 +0800
Committer: YorkShen 
Committed: Fri Apr 14 18:54:56 2017 +0800

--
 android/sdk/src/main/java/com/taobao/weex/WXSDKEngine.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/2f8eec62/android/sdk/src/main/java/com/taobao/weex/WXSDKEngine.java
--
diff --git a/android/sdk/src/main/java/com/taobao/weex/WXSDKEngine.java 
b/android/sdk/src/main/java/com/taobao/weex/WXSDKEngine.java
index c547c78..8ffceac 100644
--- a/android/sdk/src/main/java/com/taobao/weex/WXSDKEngine.java
+++ b/android/sdk/src/main/java/com/taobao/weex/WXSDKEngine.java
@@ -265,7 +265,8 @@ public class WXSDKEngine {
 true,
 WXBasicComponentType.SLIDER_NEIGHBOR
   );
-  registerComponent(SimpleListComponent.class,false,"simplelist");
+  String simpleList = "simplelist";
+  registerComponent(SimpleListComponent.class,false,simpleList);
   registerComponent(WXListComponent.class, 
false,WXBasicComponentType.LIST,WXBasicComponentType.VLIST,WXBasicComponentType.RECYCLER,WXBasicComponentType.WATERFALL);
   
registerComponent(HorizontalListComponent.class,false,WXBasicComponentType.HLIST);
   registerComponent(WXBasicComponentType.CELL, WXCell.class, true);
@@ -297,6 +298,7 @@ public class WXSDKEngine {
   registerModule("webSocket", WebSocketModule.class);
 
 
+  registerDomObject(simpleList, WXListDomObject.class);
   registerDomObject(WXBasicComponentType.INDICATOR, 
WXIndicator.IndicatorDomNode.class);
   registerDomObject(WXBasicComponentType.TEXT, WXTextDomObject.class);
   registerDomObject(WXBasicComponentType.HEADER, WXCellDomObject.class);



[4/4] incubator-weex git commit: * [test] add Macaca test case for text The test case mainly focus on the layout of text.

2017-04-18 Thread kyork
* [test] add Macaca test case for text
The test case mainly focus on the layout of text.


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

Branch: refs/heads/0.12-dev
Commit: 47200259b356c88ddb8fe6925522fb66a5089139
Parents: 90c3583
Author: YorkShen 
Authored: Wed Apr 12 11:33:11 2017 +0800
Committer: YorkShen 
Committed: Tue Apr 18 19:48:52 2017 +0800

--
 test/pages/components/text-layout.vue |  30 +++
 test/scripts/components/text.test.js  | 131 +
 2 files changed, 161 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/47200259/test/pages/components/text-layout.vue
--
diff --git a/test/pages/components/text-layout.vue 
b/test/pages/components/text-layout.vue
new file mode 100644
index 000..e73e64c
--- /dev/null
+++ b/test/pages/components/text-layout.vue
@@ -0,0 +1,30 @@
+
+  
+Hello World
+永和九年,岁在癸丑,暮春之初,会于会稽山阴之å
…
°äº­ã€‚\n\t群贤毕至,少长咸集。此地有崇山峻领,茂林脩竹;又有æ¸
…流激湍,暎带左右。引以为流觞曲水,列坐其次。\n\tLet us 
not seek to satisfy our thirst for freedom. \n\tAgain and again, we must rise 
to the majestic heights of meeting physical force with soul force.
+å…
¶å½¢ä¹Ÿï¼Œç¿©è‹¥æƒŠé¸¿ï¼Œå©‰è‹¥æ¸¸é¾™ï¼Œè£æ›œç§‹èŠï¼ŒåŽèŒ‚春松。髣髴å…
®è‹¥è½»äº‘之蔽月,飘飖å…
®è‹¥æµé£Žä¹‹å›žé›ªã€‚远而望之,皎若太阳升朝霞。迫而察之,灼若芙蕖出渌波。秾纤得衷,修短合度。肩若削成,è
…°å¦‚约素。延颈秀项,皓质呈露,芳泽无加,铅
华弗御。云髻峨峨,修眉联娟,丹唇外朗,皓齿内
鲜。明眸善睐,靥辅承权,瓌姿艳逸,仪静体闲。柔情
绰态,媚于语言。奇服旷世,骨像应图。披罗衣之璀粲å…
®ï¼Œç¥ç‘¶ç¢§ä¹‹åŽçšã€‚戴金翠之首饰,缀明珠
以耀躯。践远游之文履,曳雾绡之轻裾。微幽兰之芳蔼å…
®ï¼Œæ­¥è¸Ÿè¹°äºŽå±±éš…
。于是忽焉纵体,以遨以嬉。左倚采旄,右荫桂旗。攘皓è…
•äºŽç¥žæµ’兮,采湍濑之玄芝。
+壬戌之秋,七月既望,苏子与客泛舟游于赤壁之下。æ¸
…风徐来,水波不兴。举酒属客,诵明月之诗,歌窈窕之章
。少焉,月出于东山之上,徘徊于斗牛之间。白露横江,水å…
‰æŽ¥å¤©ã€‚纵一苇之所如,凌万顷之茫然。浩浩乎如冯虚御风,而不知å
…¶æ‰€æ­¢ï¼›é£˜é£˜ä¹Žå¦‚遗世独立,羽化而登仙。
+
+  Hello 
+
+
+
+  World
+
+
+
+  Hello 
+
+
+
+  World
+
+  
+
+
+
+.wrapper{
+width: 750px;
+background-color: yellow;
+}
+
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/47200259/test/scripts/components/text.test.js
--
diff --git a/test/scripts/components/text.test.js 
b/test/scripts/components/text.test.js
new file mode 100644
index 000..3c7c347
--- /dev/null
+++ b/test/scripts/components/text.test.js
@@ -0,0 +1,131 @@
+'use strict';
+
+var _ = require('macaca-utils');
+var assert = require('chai').assert
+var wd = require('weex-wd')
+var path = require('path');
+var os = require('os');
+var util = require("../util.js");
+
+describe('weex text', function () {
+  this.timeout(util.getTimeoutMills());
+  var driver = util.createDriver(wd);
+
+  before(function () {
+return util.init(driver)
+  .get(util.getPage('/components/text-layout.js'))
+  .waitForElementById("lines", util.getGETActionWaitTimeMills(),1000)
+  });
+
+  after(function () {
+  // return util.quit(driver);
+  })
+
+
+  let scaleFactor = 0 
+  let screenWidth = 0
+  it ('#1 Window size', () =>{
+return driver
+.getWindowSize()
+.then(size=>{
+  screenWidth =  size.width
+  scaleFactor = screenWidth/ 750
+})
+  })
+
+  it('#2 Text Content', () => {
+return driver
+.elementById('text-only')
+.text()
+.then((text)=>{
+  assert.equal(text,'Hello World')
+})
+  })
+
+  it ('#3 Line Height', () =>{
+return driver
+.elementById('lines')
+.getRect()
+.then(rect => {
+   assert.equal(rect.width, screenWidth)
+   assert.equal(rect.height, Math.floor(2 * 32 * scaleFactor))
+   scroll(rect.height)
+})
+  })
+
+   it ('#4 Font Size', () =>{
+return driver
+.elementById('font')
+.getRect()
+.then(rect => {
+   assert.equal(rect.width, screenWidth)
+   

[1/4] incubator-weex git commit: * [test] update case about line-height

2017-04-18 Thread kyork
Repository: incubator-weex
Updated Branches:
  refs/heads/0.12-dev 90c358303 -> 9d6648840


* [test] update case about line-height


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

Branch: refs/heads/0.12-dev
Commit: 9d6648840946f172d7a1eb4edfc8ea5256209711
Parents: 347180c
Author: YorkShen 
Authored: Tue Apr 18 18:53:15 2017 +0800
Committer: YorkShen 
Committed: Tue Apr 18 19:48:52 2017 +0800

--
 test/scripts/components/text.test.js | 174 +++---
 1 file changed, 86 insertions(+), 88 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9d664884/test/scripts/components/text.test.js
--
diff --git a/test/scripts/components/text.test.js 
b/test/scripts/components/text.test.js
index 2924c7c..d280eda 100644
--- a/test/scripts/components/text.test.js
+++ b/test/scripts/components/text.test.js
@@ -14,120 +14,118 @@ describe('weex text', function () {
   before(function () {
 return util.init(driver)
   .get(util.getPage('/components/text-layout.js'))
-  .waitForElementById("lines", util.getGETActionWaitTimeMills(),1000)
+  .waitForElementById("lines", util.getGETActionWaitTimeMills(), 1000)
   });
 
   after(function () {
-  // return util.quit(driver);
+// return util.quit(driver);
   })
 
 
-  let scaleFactor = 0 
+  let scaleFactor = 0
   let screenWidth = 0
-  it ('#1 Window size', () =>{
+  it('#1 Window size', () => {
 return driver
-.getWindowSize()
-.then(size=>{
-  screenWidth =  size.width
-  scaleFactor = screenWidth/ 750
-})
+  .getWindowSize()
+  .then(size => {
+screenWidth = size.width
+scaleFactor = screenWidth / 750
+  })
   })
 
   it('#2 Text Content', () => {
 return driver
-.elementById('text-only')
-.text()
-.then((text)=>{
-  assert.equal(text,'Hello World')
-})
+  .elementById('text-only')
+  .text()
+  .then((text) => {
+assert.equal(text, 'Hello World')
+  })
   })
 
-  it ('#3 Line Height', () =>{
+  it('#3 Line Height', () => {
 return driver
-.elementById('lines')
-.getRect()
-.then(rect => {
-   console.log(rect)
-   console.log(screenWidth)
-   assert.equal(rect.width, screenWidth)
-   assert.closeTo(rect.height, 32 * scaleFactor*2, 2)
-   scroll(rect.height)
-})
+  .elementById('lines')
+  .getRect()
+  .then(rect => {
+assert.equal(rect.width, screenWidth)
+assert.closeTo(rect.height, 32 * scaleFactor * 2, 2)
+scroll(rect.height)
+  })
   })
 
-   it ('#4 Font Size', () =>{
+  it('#4 Font Size', () => {
 return driver
-.elementById('font')
-.getRect()
-.then(rect => {
-   assert.equal(rect.width, screenWidth)
-   assert.isAtLeast(rect.height, Math.floor(2 * 48 * scaleFactor))
-   scroll(rect.height)
-})
+  .elementById('font')
+  .getRect()
+  .then(rect => {
+assert.equal(rect.width, screenWidth)
+assert.isAtLeast(rect.height, Math.floor(2 * 48 * scaleFactor))
+scroll(rect.height)
+  })
   })
 
-   it ('#5 Fixed-Size', () =>{
+  it('#5 Fixed-Size', () => {
 return driver
-.elementById('fixed-size')
-.getRect()
-.then(rect => {
-   assert.equal(rect.width, Math.floor(300 * scaleFactor))
-   assert.equal(rect.height, Math.floor(100 * scaleFactor))
-   scroll(rect.height)
-})
+  .elementById('fixed-size')
+  .getRect()
+  .then(rect => {
+assert.equal(rect.width, Math.floor(300 * scaleFactor))
+assert.equal(rect.height, Math.floor(100 * scaleFactor))
+scroll(rect.height)
+  })
   })
 
-   it ('#6 flex:1; align-Items: stretch; flex-direction:row', () =>{
+  it('#6 flex:1; align-Items: stretch; flex-direction:row', () => {
 return driver
-.elementById('flexgrow-alignitems')
-.getRect()
-.then(rect => {
-   assert.equal(rect.width, Math.floor(500 * scaleFactor))
-   assert.equal(rect.height, Math.floor(300 * scaleFactor))
-   scroll(rect.height)
-})
-   })
-  
-   it ('#7 flex:1; align-Items: center; flex-direction:row', () =>{
+  .elementById('flexgrow-alignitems')
+  .getRect()
+  .then(rect => {
+assert.equal(rect.width, Math.floor(500 * scaleFactor))
+assert.equal(rect.height, Math.floor(300 * scaleFactor))
+scroll(rect.height)
+  })
+  })
+
+  it('#7 flex:1; align-Items: center; flex-direction:row', () => {
 return driver
-

[2/4] incubator-weex git commit: * [android] Add log to see CI fails

2017-04-18 Thread kyork
* [android] Add log to see CI fails


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

Branch: refs/heads/0.12-dev
Commit: 758ee8e25b4670d5366f26a10c96e43c329e7e63
Parents: 4720025
Author: YorkShen 
Authored: Tue Apr 18 16:52:28 2017 +0800
Committer: YorkShen 
Committed: Tue Apr 18 19:48:52 2017 +0800

--
 test/scripts/components/text.test.js | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/758ee8e2/test/scripts/components/text.test.js
--
diff --git a/test/scripts/components/text.test.js 
b/test/scripts/components/text.test.js
index 3c7c347..36ea91c 100644
--- a/test/scripts/components/text.test.js
+++ b/test/scripts/components/text.test.js
@@ -47,6 +47,8 @@ describe('weex text', function () {
 .elementById('lines')
 .getRect()
 .then(rect => {
+   console.log(rect)
+   console.log(screenWidth)
assert.equal(rect.width, screenWidth)
assert.equal(rect.height, Math.floor(2 * 32 * scaleFactor))
scroll(rect.height)



[2/2] incubator-weex git commit: Merge branch 'test-macaca' of https://github.com/YorkShen/incubator-weex into 0.12-dev

2017-04-18 Thread kyork
Merge branch 'test-macaca' of https://github.com/YorkShen/incubator-weex into 
0.12-dev


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

Branch: refs/heads/0.12-dev
Commit: 82f9a325f7978ed3ca0dbe0bb24eeae5efa9620e
Parents: 9d66488 4c175a6
Author: YorkShen 
Authored: Wed Apr 19 10:20:11 2017 +0800
Committer: YorkShen 
Committed: Wed Apr 19 10:20:11 2017 +0800

--
 package.json  | 4 ++--
 test/serve.sh | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
--




[1/2] incubator-weex git commit: * [test] Add watch ability for macaca

2017-04-18 Thread kyork
Repository: incubator-weex
Updated Branches:
  refs/heads/0.12-dev 9d6648840 -> 82f9a325f


* [test] Add watch ability for macaca


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

Branch: refs/heads/0.12-dev
Commit: 4c175a680537c9e75ba554c09902f4acb0e0d6fa
Parents: 8ce111a
Author: YorkShen 
Authored: Wed Apr 12 11:32:10 2017 +0800
Committer: YorkShen 
Committed: Tue Apr 18 16:14:16 2017 +0800

--
 package.json  | 4 ++--
 test/serve.sh | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/4c175a68/package.json
--
diff --git a/package.json b/package.json
index 156eaee..3887a64 100644
--- a/package.json
+++ b/package.json
@@ -47,8 +47,8 @@
 "build:examples:native": "webpack --config 
build/webpack.examples.config.js",
 "build:examples:web": "webpack --config 
build/webpack.examples.web.config.js",
 "build:test": "webpack --config build/webpack.test.config.js",
-"build:ci:web": "webpack --config build/webpack.ci.web.config.js",
-"build:ci:native": "webpack --config build/webpack.ci.config.js",
+"build:ci:web": "webpack --watch --config build/webpack.ci.web.config.js",
+"build:ci:native": "webpack --watch --config build/webpack.ci.config.js",
 "build:ci": "npm run build:ci:native && npm run build:ci:web",
 "build": "npm run build:native && npm run build:browser && npm run 
build:vue && npm run build:examples && npm run build:test",
 "dist:vue": "npm run build:vue && bash ./bin/dist-vue.sh",

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/4c175a68/test/serve.sh
--
diff --git a/test/serve.sh b/test/serve.sh
index b23dbfd..1b3f18a 100755
--- a/test/serve.sh
+++ b/test/serve.sh
@@ -1,4 +1,4 @@
 #!/bin/bash -eu
 npm run build:vue
-npm run build:ci
+npm run build:ci &
 npm run serve:ui-test 
\ No newline at end of file



incubator-weex git commit: * [android] move Dom.Transform, Dom.TransformOrigin to Constants.

2017-08-14 Thread kyork
Repository: incubator-weex
Updated Branches:
  refs/heads/0.16-dev ee94722cf -> 8a8dfb818


* [android] move Dom.Transform, Dom.TransformOrigin to Constants.


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

Branch: refs/heads/0.16-dev
Commit: 8a8dfb818cf7db2c68570b45f82a947f979a5dda
Parents: ee94722
Author: YorkShen 
Authored: Tue Aug 15 11:33:45 2017 +0800
Committer: YorkShen 
Committed: Tue Aug 15 11:33:45 2017 +0800

--
 .../main/java/com/taobao/weex/common/Constants.java  |  2 ++
 .../main/java/com/taobao/weex/dom/WXDomObject.java   | 15 +--
 2 files changed, 15 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/8a8dfb81/android/sdk/src/main/java/com/taobao/weex/common/Constants.java
--
diff --git a/android/sdk/src/main/java/com/taobao/weex/common/Constants.java 
b/android/sdk/src/main/java/com/taobao/weex/common/Constants.java
index e24ed22..73c3399 100644
--- a/android/sdk/src/main/java/com/taobao/weex/common/Constants.java
+++ b/android/sdk/src/main/java/com/taobao/weex/common/Constants.java
@@ -170,6 +170,8 @@ public class Constants {
 String OFFSET = "offset";
 String ANIMATED = "animated";
 String STABLE = "stable";
+String TRANSFORM = "transform";
+String TRANSFORM_ORIGIN = "transformOrigin";
 
 String INSERT_CELL_ANIMATION = "insertAnimation";
 String DELETE_CELL_ANIMATION = "deleteAnimation";

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/8a8dfb81/android/sdk/src/main/java/com/taobao/weex/dom/WXDomObject.java
--
diff --git a/android/sdk/src/main/java/com/taobao/weex/dom/WXDomObject.java 
b/android/sdk/src/main/java/com/taobao/weex/dom/WXDomObject.java
index 9643abd..6f8f7fb 100644
--- a/android/sdk/src/main/java/com/taobao/weex/dom/WXDomObject.java
+++ b/android/sdk/src/main/java/com/taobao/weex/dom/WXDomObject.java
@@ -29,6 +29,7 @@ import com.taobao.weex.WXSDKInstance;
 import com.taobao.weex.WXSDKManager;
 import com.taobao.weex.bridge.WXValidateProcessor;
 import com.taobao.weex.common.Constants;
+import com.taobao.weex.common.Constants.Name;
 import com.taobao.weex.dom.flex.CSSLayoutContext;
 import com.taobao.weex.dom.flex.CSSNode;
 import com.taobao.weex.dom.flex.Spacing;
@@ -54,8 +55,18 @@ public class WXDomObject extends CSSNode implements 
Cloneable,ImmutableDomObject
   public static final String TYPE = "type";
   public static final String TAG = WXDomObject.class.getSimpleName();
   public static final String ROOT = "_root";
-  public static final String TRANSFORM = "transform";
-  public static final String TRANSFORM_ORIGIN = "transformOrigin";
+
+  /**
+   * Use {@link Name#TRANSFORM} instead.
+   */
+  @Deprecated
+  public static final String TRANSFORM = Name.TRANSFORM;
+
+  /**
+   * Use {@link Name#TRANSFORM_ORIGIN} instead.
+   */
+  @Deprecated
+  public static final String TRANSFORM_ORIGIN = Name.TRANSFORM_ORIGIN;
   static final WXDomObject DESTROYED = new WXDomObject();
   static{
 DESTROYED.mRef = "_destroyed";



[4/8] incubator-weex git commit: * [android] Move perspective from style to transform

2017-08-10 Thread kyork
* [android] Move perspective from style to transform


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

Branch: refs/heads/0.16-dev
Commit: cc49764e6de39774804904f163b5d51fdfc520ef
Parents: 924d252
Author: YorkShen 
Authored: Thu Jul 27 11:30:26 2017 +0800
Committer: YorkShen 
Committed: Thu Jul 27 11:30:26 2017 +0800

--
 .../taobao/weex/dom/action/AnimationAction.java |  1 +
 .../ui/animation/CameraDistanceProperty.java| 54 
 .../weex/ui/animation/WXAnimationBean.java  | 26 ++
 .../taobao/weex/ui/component/WXComponent.java   | 22 
 4 files changed, 81 insertions(+), 22 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/cc49764e/android/sdk/src/main/java/com/taobao/weex/dom/action/AnimationAction.java
--
diff --git 
a/android/sdk/src/main/java/com/taobao/weex/dom/action/AnimationAction.java 
b/android/sdk/src/main/java/com/taobao/weex/dom/action/AnimationAction.java
index 59afbca..5510ea9 100644
--- a/android/sdk/src/main/java/com/taobao/weex/dom/action/AnimationAction.java
+++ b/android/sdk/src/main/java/com/taobao/weex/dom/action/AnimationAction.java
@@ -155,6 +155,7 @@ class AnimationAction implements DOMAction, RenderAction {
 if (interpolator != null) {
   animator.setInterpolator(interpolator);
 }
+
component.getHostView().setCameraDistance(mAnimationBean.styles.getCameraDistance());
 animator.setDuration(mAnimationBean.duration);
 animator.start();
   }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/cc49764e/android/sdk/src/main/java/com/taobao/weex/ui/animation/CameraDistanceProperty.java
--
diff --git 
a/android/sdk/src/main/java/com/taobao/weex/ui/animation/CameraDistanceProperty.java
 
b/android/sdk/src/main/java/com/taobao/weex/ui/animation/CameraDistanceProperty.java
new file mode 100644
index 000..67b9235
--- /dev/null
+++ 
b/android/sdk/src/main/java/com/taobao/weex/ui/animation/CameraDistanceProperty.java
@@ -0,0 +1,54 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.taobao.weex.ui.animation;
+
+import android.os.Build.VERSION;
+import android.os.Build.VERSION_CODES;
+import android.util.Property;
+import android.view.View;
+
+
+class CameraDistanceProperty extends Property {
+
+  private final static String TAG = "CameraDistance";
+  private static CameraDistanceProperty instance;
+
+  static Property getInstance(){
+return instance;
+  }
+
+  private CameraDistanceProperty() {
+super(Float.class, TAG);
+  }
+
+  @Override
+  public Float get(View view) {
+if (VERSION.SDK_INT >= VERSION_CODES.JELLY_BEAN) {
+  return view.getCameraDistance();
+}
+else{
+  return Float.NaN;
+}
+  }
+
+  @Override
+  public void set(View object, Float value) {
+object.setCameraDistance(value);
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/cc49764e/android/sdk/src/main/java/com/taobao/weex/ui/animation/WXAnimationBean.java
--
diff --git 
a/android/sdk/src/main/java/com/taobao/weex/ui/animation/WXAnimationBean.java 
b/android/sdk/src/main/java/com/taobao/weex/ui/animation/WXAnimationBean.java
index 54b3111..d83b85a 100644
--- 
a/android/sdk/src/main/java/com/taobao/weex/ui/animation/WXAnimationBean.java
+++ 
b/android/sdk/src/main/java/com/taobao/weex/ui/animation/WXAnimationBean.java
@@ -26,7 +26,9 @@ import android.text.TextUtils;
 import android.util.Pair;
 import android.util.Property;
 import android.view.View;
+import com.taobao.weex.WXEnvironment;
 import 

[8/8] incubator-weex git commit: Merge branch 'android-feature-lines' of https://github.com/YorkShen/incubator-weex into 0.16-dev

2017-08-10 Thread kyork
Merge branch 'android-feature-lines' of 
https://github.com/YorkShen/incubator-weex into 0.16-dev


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

Branch: refs/heads/0.16-dev
Commit: c95fc2325cc1d257b434d3e4028838d8fd822c73
Parents: c6c0462 86c2a7d
Author: YorkShen 
Authored: Thu Aug 10 15:04:37 2017 +0800
Committer: YorkShen 
Committed: Thu Aug 10 15:04:37 2017 +0800

--
 .../com/taobao/weex/dom/WXTextDomObject.java| 91 +---
 1 file changed, 60 insertions(+), 31 deletions(-)
--




[1/8] incubator-weex git commit: * [android] Refactor the process of lines style in text.

2017-08-10 Thread kyork
Repository: incubator-weex
Updated Branches:
  refs/heads/0.16-dev 8b9845ebe -> c95fc2325


* [android] Refactor the process of lines style in text.


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

Branch: refs/heads/0.16-dev
Commit: 86c2a7d60e1e506b7c448fb5e83b6ecc00c5b697
Parents: 92a1616
Author: YorkShen 
Authored: Fri Jul 21 14:43:25 2017 +0800
Committer: YorkShen 
Committed: Fri Jul 21 14:43:25 2017 +0800

--
 .../com/taobao/weex/dom/WXTextDomObject.java| 91 +---
 1 file changed, 60 insertions(+), 31 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/86c2a7d6/android/sdk/src/main/java/com/taobao/weex/dom/WXTextDomObject.java
--
diff --git a/android/sdk/src/main/java/com/taobao/weex/dom/WXTextDomObject.java 
b/android/sdk/src/main/java/com/taobao/weex/dom/WXTextDomObject.java
index fe06b06..06084a9 100644
--- a/android/sdk/src/main/java/com/taobao/weex/dom/WXTextDomObject.java
+++ b/android/sdk/src/main/java/com/taobao/weex/dom/WXTextDomObject.java
@@ -18,22 +18,26 @@
  */
 package com.taobao.weex.dom;
 
+import static com.taobao.weex.dom.WXStyle.UNSET;
+
 import android.graphics.Canvas;
 import android.graphics.Typeface;
 import android.os.Build;
 import android.support.annotation.NonNull;
 import android.support.annotation.Nullable;
+import android.text.Editable;
 import android.text.Layout;
 import android.text.Spannable;
 import android.text.SpannableString;
+import android.text.SpannableStringBuilder;
 import android.text.Spanned;
+import android.text.SpannedString;
 import android.text.StaticLayout;
 import android.text.TextPaint;
 import android.text.TextUtils;
 import android.text.style.AbsoluteSizeSpan;
 import android.text.style.AlignmentSpan;
 import android.text.style.ForegroundColorSpan;
-
 import com.taobao.weex.WXEnvironment;
 import com.taobao.weex.common.Constants;
 import com.taobao.weex.dom.flex.CSSConstants;
@@ -45,15 +49,12 @@ import com.taobao.weex.ui.component.WXTextDecoration;
 import com.taobao.weex.utils.WXDomUtils;
 import com.taobao.weex.utils.WXLogUtils;
 import com.taobao.weex.utils.WXResourceUtils;
-
 import java.util.Collections;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
 import java.util.concurrent.atomic.AtomicReference;
 
-import static com.taobao.weex.dom.WXStyle.UNSET;
-
 /**
  * Class for calculating a given text's height and width. The calculating of 
width and height of
  * text is done by {@link Layout}.
@@ -299,7 +300,7 @@ public class WXTextDomObject extends WXDomObject {
 Layout layout;
 if (!FloatUtil.floatsEqual(previousWidth, textWidth) || previousLayout == 
null) {
   layout = new StaticLayout(spanned, mTextPaint, (int) 
Math.ceil(textWidth),
-Layout.Alignment.ALIGN_NORMAL, 1, 0, false);
+  Layout.Alignment.ALIGN_NORMAL, 1, 0, false);
 } else {
   layout = previousLayout;
 }
@@ -308,37 +309,65 @@ public class WXTextDomObject extends WXDomObject {
   lastLineStart = layout.getLineStart(mNumberOfLines - 1);
   lastLineEnd = layout.getLineEnd(mNumberOfLines - 1);
   if (lastLineStart < lastLineEnd) {
-String text = mText.subSequence(0, lastLineStart).toString() +
-   truncate(mText.substring(lastLineStart, 
lastLineEnd),
-mTextPaint, layout.getWidth(), 
textOverflow);
-spanned = createSpanned(text);
+SpannableStringBuilder builder = new 
SpannableStringBuilder(spanned.subSequence(0, lastLineStart));
+Editable lastLine = new 
SpannableStringBuilder(spanned.subSequence(lastLineStart, lastLineEnd));
+builder.append(truncate(lastLine, mTextPaint, layout.getWidth(), 
textOverflow));
+adjustSpansRange(spanned, builder);
+spanned = builder;
 return new StaticLayout(spanned, mTextPaint, (int) 
Math.ceil(textWidth),
-Layout.Alignment.ALIGN_NORMAL, 1, 0, false);
+Layout.Alignment.ALIGN_NORMAL, 1, 0, false);
   }
 }
 return layout;
   }
 
-  public @NonNull String truncate(@Nullable String source, @NonNull TextPaint 
paint,
-  int desired, @Nullable TextUtils.TruncateAt 
truncateAt){
-if(!TextUtils.isEmpty(source)){
-  StringBuilder builder;
-  Spanned spanned;
+  /**
+   * Truncate the source span to the specified lines.
+   * Caller of this method must ensure that the lines of text is 
greater than 

[5/8] incubator-weex git commit: * [android] Use linkedHashMap instead of HashMap

2017-08-10 Thread kyork
* [android] Use linkedHashMap instead of HashMap


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

Branch: refs/heads/0.16-dev
Commit: b96d92d84bf99a661770897c9b3f4d6d14757750
Parents: cc49764
Author: YorkShen 
Authored: Fri Jul 28 14:26:09 2017 +0800
Committer: YorkShen 
Committed: Fri Jul 28 14:26:09 2017 +0800

--
 .../weex/ui/animation/WXAnimationBean.java  | 32 
 1 file changed, 20 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/b96d92d8/android/sdk/src/main/java/com/taobao/weex/ui/animation/WXAnimationBean.java
--
diff --git 
a/android/sdk/src/main/java/com/taobao/weex/ui/animation/WXAnimationBean.java 
b/android/sdk/src/main/java/com/taobao/weex/ui/animation/WXAnimationBean.java
index d83b85a..f5f0d36 100644
--- 
a/android/sdk/src/main/java/com/taobao/weex/ui/animation/WXAnimationBean.java
+++ 
b/android/sdk/src/main/java/com/taobao/weex/ui/animation/WXAnimationBean.java
@@ -41,6 +41,7 @@ import java.util.LinkedHashMap;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
+import java.util.Map.Entry;
 
 public class WXAnimationBean {
 
@@ -80,7 +81,9 @@ public class WXAnimationBean {
 private static final String ZERO = "0%";
 private static final String PX = "px";
 private static final String DEG = "deg";
-public static Map>> wxToAndroidMap = new 
HashMap<>();
+public static Map>> wxToAndroidMap = new 
ArrayMap<>();
+private static Map, Float> defaultMap= new 
ArrayMap<>();
+
 
 static {
   wxToAndroidMap.put(WX_TRANSLATE, Arrays.asList
@@ -95,6 +98,13 @@ public class WXAnimationBean {
   wxToAndroidMap.put(WX_SCALE_Y, Collections.singletonList(View.SCALE_Y));
   wxToAndroidMap.put(Name.PERSPECTIVE, 
Collections.singletonList(CameraDistanceProperty.getInstance()));
   wxToAndroidMap = Collections.unmodifiableMap(wxToAndroidMap);
+  defaultMap.put(View.TRANSLATION_X, 0f);
+  defaultMap.put(View.TRANSLATION_Y, 0f);
+  defaultMap.put(View.SCALE_X, 1f);
+  defaultMap.put(View.SCALE_Y, 1f);
+  defaultMap.put(View.ROTATION, 0f);
+  defaultMap.put(View.ROTATION_X, 0f);
+  defaultMap.put(View.ROTATION_Y, 0f);
 }
 
 public String opacity;
@@ -103,7 +113,7 @@ public class WXAnimationBean {
 public String height;
 public String transform;
 public String transformOrigin;
-private Map, Float> transformMap = new HashMap<>();
+private Map, Float> transformMap = new 
LinkedHashMap<>();
 private Pair pivot;
 private List holders=new LinkedList<>();
 private float cameraDistance = Float.MAX_VALUE;
@@ -300,14 +310,12 @@ public class WXAnimationBean {
   return WXUtils.fastGetFloat(percent, precision) / 100 * unit;
 }
 
-private static @NonNull Map, Float> 
createDefaultTransform(){
-  Map, Float> defaultMap= new ArrayMap<>(5);
-  defaultMap.put(View.TRANSLATION_X, 0f);
-  defaultMap.put(View.TRANSLATION_Y, 0f);
-  defaultMap.put(View.SCALE_X, 1f);
-  defaultMap.put(View.SCALE_Y, 1f);
-  defaultMap.put(View.ROTATION, 0f);
-  return defaultMap;
+private void resetToDefaultIfAbsent() {
+  for (Entry, Float> entry : defaultMap.entrySet()) {
+if (!transformMap.containsKey(entry.getKey())) {
+  transformMap.put(entry.getKey(), entry.getValue());
+}
+  }
 }
 
 public @Nullable Pair getPivot() {
@@ -317,9 +325,9 @@ public class WXAnimationBean {
 public void init(@Nullable String transformOrigin,@Nullable String 
rawTransform,
  final int width, final int height,int viewportW){
   pivot = parsePivot(transformOrigin,width,height,viewportW);
-  transformMap = createDefaultTransform();
   transformMap.putAll(parseTransForm(rawTransform,width,height,viewportW));
-  if(transformMap.containsKey(CameraDistanceProperty.getInstance())){
+  resetToDefaultIfAbsent();
+  if (transformMap.containsKey(CameraDistanceProperty.getInstance())) {
 cameraDistance = 
transformMap.remove(CameraDistanceProperty.getInstance());
   }
   initHolders();



[2/8] incubator-weex git commit: * [android] Add the ability of changing perspective

2017-08-10 Thread kyork
* [android] Add the ability of changing perspective


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

Branch: refs/heads/0.16-dev
Commit: 9715b8d75e45f89375c27928a49211a1214e3828
Parents: f102f3f
Author: YorkShen 
Authored: Fri Jul 21 16:44:22 2017 +0800
Committer: YorkShen 
Committed: Fri Jul 21 16:44:22 2017 +0800

--
 .../sdk/src/main/java/com/taobao/weex/common/Constants.java  | 1 +
 .../main/java/com/taobao/weex/ui/component/WXComponent.java  | 8 +++-
 2 files changed, 8 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9715b8d7/android/sdk/src/main/java/com/taobao/weex/common/Constants.java
--
diff --git a/android/sdk/src/main/java/com/taobao/weex/common/Constants.java 
b/android/sdk/src/main/java/com/taobao/weex/common/Constants.java
index f683c99..e24ed22 100644
--- a/android/sdk/src/main/java/com/taobao/weex/common/Constants.java
+++ b/android/sdk/src/main/java/com/taobao/weex/common/Constants.java
@@ -152,6 +152,7 @@ public class Constants {
 String OFFSET_X_ACCURACY = "offsetXAccuracy";
 String OFFSET_X_RATIO = "offsetXRatio";
 String ELEVATION = "elevation";
+String PERSPECTIVE = "perspective";
 String SCROLLABLE = "scrollable";
 String DRAGGABLE = "draggable";
 String DISTANCE_Y = "dy";

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9715b8d7/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
--
diff --git 
a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java 
b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
index 4099778..3aa549d 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
@@ -48,6 +48,7 @@ import com.taobao.weex.WXSDKInstance;
 import com.taobao.weex.WXSDKManager;
 import com.taobao.weex.bridge.Invoker;
 import com.taobao.weex.common.Constants;
+import com.taobao.weex.common.Constants.Name;
 import com.taobao.weex.common.IWXObject;
 import com.taobao.weex.common.WXRuntimeException;
 import com.taobao.weex.dom.ImmutableDomObject;
@@ -675,6 +676,8 @@ public abstract class  WXComponent 
implements IWXObject, IWXActi
   updateElevation();
 }
 return true;
+  case Name.PERSPECTIVE:
+return setPerspective(param);
   case PROP_FIXED_SIZE:
 String fixedSize = WXUtils.getString(param, PROP_FS_MATCH_PARENT);
 setFixedSize(fixedSize);
@@ -719,17 +722,20 @@ public abstract class  WXComponent 
implements IWXObject, IWXActi
 }
   }
 
-  private void setPerspective(Object param) {
+  private boolean setPerspective(Object param) {
 T host = getHostView();
+boolean ret = false;
 if (host != null) {
   float value = WXUtils.getFloatByViewport(param, 
getInstance().getInstanceViewPortWidth());
   float scale = host.getResources().getDisplayMetrics().density;
   if (!Float.isNaN(value) && value > 0) {
 host.setCameraDistance(value * scale);
+ret = true;
   } else {
 host.setCameraDistance(Float.MAX_VALUE);
   }
 }
+return ret;
   }
 
   @TargetApi(Build.VERSION_CODES.JELLY_BEAN)



[6/8] incubator-weex git commit: * [android] Add WXAnimationBean.Styles.init()

2017-08-10 Thread kyork
* [android] Add WXAnimationBean.Styles.init()


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

Branch: refs/heads/0.16-dev
Commit: 0b9065861c36ee1d5c1a60c2f3705f7244318f25
Parents: b96d92d
Author: YorkShen 
Authored: Thu Aug 3 16:05:56 2017 +0800
Committer: YorkShen 
Committed: Thu Aug 3 16:05:56 2017 +0800

--
 .../com/taobao/weex/ui/animation/WXAnimationBean.java | 14 +-
 1 file changed, 13 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/0b906586/android/sdk/src/main/java/com/taobao/weex/ui/animation/WXAnimationBean.java
--
diff --git 
a/android/sdk/src/main/java/com/taobao/weex/ui/animation/WXAnimationBean.java 
b/android/sdk/src/main/java/com/taobao/weex/ui/animation/WXAnimationBean.java
index f5f0d36..f3f7be5 100644
--- 
a/android/sdk/src/main/java/com/taobao/weex/ui/animation/WXAnimationBean.java
+++ 
b/android/sdk/src/main/java/com/taobao/weex/ui/animation/WXAnimationBean.java
@@ -54,7 +54,7 @@ public class WXAnimationBean {
   public long delay;
   public long duration;
   public String timingFunction;
-  public Style styles;
+  public @Nullable Style styles;
   public boolean needLayout;
 
   public static class Style {
@@ -333,6 +333,18 @@ public class WXAnimationBean {
   initHolders();
 }
 
+/**
+ * Use this method to init if you already have a list of Property
+ * The key is something like {@link View#TRANSLATION_X} and the value is a 
{@link Pair},
+ * of which the first is beginning value and the second is ending value.
+ * @param styles a list of Property
+ */
+public void init(@NonNull Map, Pair> 
styles){
+  for(Entry, Pair> 
entry:styles.entrySet()){
+holders.add(PropertyValuesHolder.ofFloat(entry.getKey(), 
entry.getValue().first, entry.getValue().second));
+  }
+}
+
 private void initHolders(){
   for (Map.Entry, Float> entry : 
transformMap.entrySet()) {
 holders.add(PropertyValuesHolder.ofFloat(entry.getKey(), 
entry.getValue()));



[3/8] incubator-weex git commit: * [android] Fix bug of perspective

2017-08-10 Thread kyork
* [android] Fix bug of perspective


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

Branch: refs/heads/0.16-dev
Commit: 924d252c9dc0dc517011983ca07d086f3c5e1bf8
Parents: 9715b8d
Author: YorkShen 
Authored: Wed Jul 26 16:51:05 2017 +0800
Committer: YorkShen 
Committed: Wed Jul 26 16:51:05 2017 +0800

--
 .../taobao/weex/ui/animation/WXAnimationBean.java   | 16 +++-
 .../com/taobao/weex/ui/component/WXComponent.java   |  2 +-
 2 files changed, 4 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/924d252c/android/sdk/src/main/java/com/taobao/weex/ui/animation/WXAnimationBean.java
--
diff --git 
a/android/sdk/src/main/java/com/taobao/weex/ui/animation/WXAnimationBean.java 
b/android/sdk/src/main/java/com/taobao/weex/ui/animation/WXAnimationBean.java
index 2635d7c..54b3111 100644
--- 
a/android/sdk/src/main/java/com/taobao/weex/ui/animation/WXAnimationBean.java
+++ 
b/android/sdk/src/main/java/com/taobao/weex/ui/animation/WXAnimationBean.java
@@ -124,12 +124,10 @@ public class WXAnimationBean {
   @NonNull List 
rawValue) {
 Map, Float> result = 
WXDataStructureUtil.newHashMapWithExpectedSize(propertyList.size());
 List convertedList = new 
ArrayList<>(propertyList.size());
-if (propertyList.contains(View.ROTATION)) {
+if (propertyList.contains(View.ROTATION) ||
+propertyList.contains(View.ROTATION_X) ||
+propertyList.contains(View.ROTATION_Y)) {
   convertedList.addAll(parseRotationZ(rawValue));
-}else if(propertyList.contains(View.ROTATION_X)) {
-  convertedList.addAll(parseRotationXY(rawValue));
-}else if(propertyList.contains(View.ROTATION_Y)) {
-  convertedList.addAll(parseRotationXY(rawValue));
 }else if (propertyList.contains(View.TRANSLATION_X) ||
propertyList.contains(View.TRANSLATION_Y)) {
   convertedList.addAll(parseTranslation(propertyList, width, 
height, rawValue,viewportW));
@@ -158,14 +156,6 @@ public class WXAnimationBean {
 return convertedList;
   }
 
-  private List parseRotationXY(@NonNull List 
rawValue) {
-List intermediate = parseRotationZ(rawValue);
-for (int i = 0; i < intermediate.size(); i++) {
-  intermediate.set(i, -intermediate.get(i));
-}
-return intermediate;
-  }
-
   private @NonNull List parseRotationZ(@NonNull 
List rawValue) {
 List convertedList = new ArrayList<>(1);
 int suffix;

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/924d252c/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
--
diff --git 
a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java 
b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
index 3aa549d..80cd4db 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
@@ -726,7 +726,7 @@ public abstract class  WXComponent 
implements IWXObject, IWXActi
 T host = getHostView();
 boolean ret = false;
 if (host != null) {
-  float value = WXUtils.getFloatByViewport(param, 
getInstance().getInstanceViewPortWidth());
+  float value = WXViewUtils.getRealPxByWidth(WXUtils.getFloat(param), 
getInstance().getInstanceViewPortWidth());
   float scale = host.getResources().getDisplayMetrics().density;
   if (!Float.isNaN(value) && value > 0) {
 host.setCameraDistance(value * scale);



[3/3] incubator-weex git commit: Merge branch 'android-feature-api25' of https://github.com/YorkShen/incubator-weex into 0.16-dev

2017-08-10 Thread kyork
Merge branch 'android-feature-api25' of 
https://github.com/YorkShen/incubator-weex into 0.16-dev


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

Branch: refs/heads/0.16-dev
Commit: 452c4d7d29cfbd31cd36a0d0dfd7764597ee4ce9
Parents: c95fc23 1752f06
Author: YorkShen 
Authored: Thu Aug 10 15:08:07 2017 +0800
Committer: YorkShen 
Committed: Thu Aug 10 15:08:07 2017 +0800

--
 .travis.yml  | 8 
 android/build.gradle | 8 
 .../sdk/src/main/java/com/taobao/weex/utils/WXViewUtils.java | 4 ++--
 3 files changed, 10 insertions(+), 10 deletions(-)
--




[2/3] incubator-weex git commit: * [android] Update to VERSION_CODE.N

2017-08-10 Thread kyork
* [android] Update to VERSION_CODE.N


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

Branch: refs/heads/0.16-dev
Commit: 1752f06ec6304e5f716a92db572c04cb94673933
Parents: efd535a
Author: YorkShen 
Authored: Fri Jul 28 17:21:12 2017 +0800
Committer: YorkShen 
Committed: Fri Jul 28 17:21:12 2017 +0800

--
 android/sdk/src/main/java/com/taobao/weex/utils/WXViewUtils.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/1752f06e/android/sdk/src/main/java/com/taobao/weex/utils/WXViewUtils.java
--
diff --git a/android/sdk/src/main/java/com/taobao/weex/utils/WXViewUtils.java 
b/android/sdk/src/main/java/com/taobao/weex/utils/WXViewUtils.java
index c6120d5..fb9ab8b 100644
--- a/android/sdk/src/main/java/com/taobao/weex/utils/WXViewUtils.java
+++ b/android/sdk/src/main/java/com/taobao/weex/utils/WXViewUtils.java
@@ -28,6 +28,7 @@ import android.graphics.RectF;
 import android.graphics.drawable.Drawable;
 import android.graphics.drawable.LayerDrawable;
 import android.os.Build;
+import android.os.Build.VERSION_CODES;
 import android.support.annotation.IntDef;
 import android.support.annotation.NonNull;
 import android.support.annotation.Nullable;
@@ -404,10 +405,9 @@ public class WXViewUtils {
* clipPath doesn't work with rotation nor scale when API level is 24.
* As animation will not cause redraw if hardware-acceleration enabled, 
clipCanvas feature has
* to be disabled when API level is 24 without considering the animation 
property.
-   * As the compile version of weex_sdk is 23, so API level 24 has to be 
hard-code.
*/
   private static boolean clipCanvasIfAnimationExist() {
-return Build.VERSION.SDK_INT != 24;
+return Build.VERSION.SDK_INT != VERSION_CODES.N;
   }
 
   /**



[1/3] incubator-weex git commit: * [android] Upgrade to API 25.

2017-08-10 Thread kyork
Repository: incubator-weex
Updated Branches:
  refs/heads/0.16-dev c95fc2325 -> 452c4d7d2


* [android] Upgrade to API 25.


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

Branch: refs/heads/0.16-dev
Commit: efd535a76fece0780c5331d3b2916a368493d405
Parents: 495fc6b
Author: YorkShen 
Authored: Fri Jul 28 16:48:38 2017 +0800
Committer: YorkShen 
Committed: Fri Jul 28 16:48:38 2017 +0800

--
 .travis.yml  | 8 
 android/build.gradle | 8 
 2 files changed, 8 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/efd535a7/.travis.yml
--
diff --git a/.travis.yml b/.travis.yml
index e49b8ca..a62ef95 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -46,8 +46,8 @@ matrix:
   components:
 - platform-tools
 - tools
-- build-tools-23.0.3
-- android-23
+- build-tools-25.0.3
+- android-25
 - extra-google-m2repository
 - extra-android-m2repository
 - sys-img-armeabi-v7a-android-22
@@ -77,8 +77,8 @@ before_script:
   export 
PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin:$ANDROID_HOME/platform-tools
   echo yes | sdkmanager platform-tools
   echo yes | sdkmanager tools #tools
-  echo yes | sdkmanager "build-tools;23.0.3" #build-tool
-  echo yes | sdkmanager "platforms;android-23" #compile target
+  echo yes | sdkmanager "build-tools;25.0.3" #build-tool
+  echo yes | sdkmanager "platforms;android-25" #compile target
   echo yes | sdkmanager "extras;android;m2repository" #support
 fi
 script:

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/efd535a7/android/build.gradle
--
diff --git a/android/build.gradle b/android/build.gradle
index 7cc3c36..28cf76e 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -33,12 +33,12 @@ subprojects {
 }
 }
 ext {
-compileSdkVersion=23
-buildToolsVersion="23.0.3"
+compileSdkVersion=25
+buildToolsVersion="25.0.3"
 minSdkVersion=14
 appMinSdkVersion=15
-targetSdkVersion=23
-supportLibVersion="23.4.0"
+targetSdkVersion=25
+supportLibVersion="25.3.1"
 fastjsonLibVersion="1.1.46.android"
 }
 }



[7/8] incubator-weex git commit: Merge branch 'android-feature-perspective' of https://github.com/YorkShen/incubator-weex into 0.16-dev

2017-08-10 Thread kyork
Merge branch 'android-feature-perspective' of 
https://github.com/YorkShen/incubator-weex into 0.16-dev


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

Branch: refs/heads/0.16-dev
Commit: c6c04624af3f773203b0cf0aa21c5433edaa69a2
Parents: 8b9845e 0b90658
Author: YorkShen 
Authored: Thu Aug 10 15:04:10 2017 +0800
Committer: YorkShen 
Committed: Thu Aug 10 15:04:10 2017 +0800

--
 .../java/com/taobao/weex/common/Constants.java  |  1 +
 .../taobao/weex/dom/action/AnimationAction.java |  1 +
 .../ui/animation/CameraDistanceProperty.java| 54 
 .../weex/ui/animation/WXAnimationBean.java  | 86 ++--
 .../taobao/weex/ui/component/WXComponent.java   | 16 
 5 files changed, 117 insertions(+), 41 deletions(-)
--




incubator-weex git commit: * [doc] Update doc of animation.

2017-08-13 Thread kyork
Repository: incubator-weex
Updated Branches:
  refs/heads/0.16-dev 51ed22dcb -> 096c59b80


* [doc] Update doc of animation.


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

Branch: refs/heads/0.16-dev
Commit: 096c59b80aca8399f146639ede15a952757f495c
Parents: 51ed22d
Author: YorkShen 
Authored: Mon Aug 14 11:26:25 2017 +0800
Committer: YorkShen 
Committed: Mon Aug 14 11:26:25 2017 +0800

--
 doc/source/cn/references/common-style.md  | 2 ++
 doc/source/cn/references/modules/animation.md | 2 +-
 doc/source/references/common-style.md | 2 ++
 doc/source/references/modules/animation.md| 2 +-
 4 files changed, 6 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/096c59b8/doc/source/cn/references/common-style.md
--
diff --git a/doc/source/cn/references/common-style.md 
b/doc/source/cn/references/common-style.md
index a36d2cd..ed84a6b 100644
--- a/doc/source/cn/references/common-style.md
+++ b/doc/source/cn/references/common-style.md
@@ -314,6 +314,8 @@ transform 属性向元素应用 2D 转换。该属性å…
è®¸æˆ‘们对元素进行
 - scaleX(  )
 - scaleY(  )
 - rotate(  )
+- rotateX(  ) v0.14+
+- rotateY(  ) v0.14+
 - transform-origin: number/percentage/keyword(top/left/right/bottom)
 
 ### 示例

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/096c59b8/doc/source/cn/references/modules/animation.md
--
diff --git a/doc/source/cn/references/modules/animation.md 
b/doc/source/cn/references/modules/animation.md
index 38f9bec..de61e71 100644
--- a/doc/source/cn/references/modules/animation.md
+++ b/doc/source/cn/references/modules/animation.md
@@ -45,7 +45,7 @@ version: 2.1
 | 名称 | 描述 | 值类型 | 默认值 | 示例 |
 |  |  |  |  |  |
 | `translate`/`translateX`/`translateY` | 指定元素要移动到的位置 | 
像素值或百分比 | 无 |
-| `rotate` | 指定元素将被旋转的角度,单位是度 | number | 无 |
+| `rotate`/`rotateX` v0.14+ /`rotateY` v0.14+ | 指定元素
将被旋转的角度,单位是度 | number | 无 |
 | `scale`/`scaleX`/`scaleY` | 按比例放大或缩小元素 | number | 无 |
 
 * `callback {Function}`:动画执行完毕之后的回调

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/096c59b8/doc/source/references/common-style.md
--
diff --git a/doc/source/references/common-style.md 
b/doc/source/references/common-style.md
index 4250fec..59432a0 100644
--- a/doc/source/references/common-style.md
+++ b/doc/source/references/common-style.md
@@ -203,6 +203,8 @@ Currently supported format:
 * scaleX(  )
 * scaleY(  )
 * rotate(  )
+* rotateX(  ) v0.14+
+* rotateY(  ) v0.14+
 * transform-origin: number/percentage/keyword(top/left/right/bottom)
 
 ### Example

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/096c59b8/doc/source/references/modules/animation.md
--
diff --git a/doc/source/references/modules/animation.md 
b/doc/source/references/modules/animation.md
index 29de02b..5f8f09b 100644
--- a/doc/source/references/modules/animation.md
+++ b/doc/source/references/modules/animation.md
@@ -52,7 +52,7 @@ properties of `transform`:
 | name | description | value type | default value |
 | :--- | :--- | :--- | :--- |
 |translate/translateX/translateY|Specifies the location of which the element 
will be translated to.|pixel or percent|none|
-|rotate|Specifies the angle of which the element will be rotated, the unit is 
degree.|number|none|
+|rotate/rotateX v0.14+ /rotateY v0.14+ |Specifies the angle of which the element 
will be rotated, the unit is degree.|number|none|
 |scale/scaleX/scaleY|Stretch or shrink the element.|number|none|  
 
 # callback



[06/13] incubator-weex git commit: * [jsfm] update jsfm version fix bug

2017-08-10 Thread kyork
* [jsfm] update jsfm version fix bug


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

Branch: refs/heads/0.16-dev
Commit: ee918ad8a33193dbe0fd9d205ad60eef0783de13
Parents: a661b6f
Author: atomtong 
Authored: Wed Aug 9 17:43:41 2017 +0800
Committer: atomtong 
Committed: Wed Aug 9 17:43:41 2017 +0800

--
 pre-build/native-bundle-main.js | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)
--




[02/13] incubator-weex git commit: + [android] ignore set index when current index not zero @notdanger

2017-08-10 Thread kyork
+ [android] ignore set index when current index not zero @notdanger


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

Branch: refs/heads/0.16-dev
Commit: 43c5fdfdbdec57d1dc243b18eb0f3f2c82033844
Parents: fed8b64
Author: misakuo 
Authored: Mon Aug 7 10:45:50 2017 +0800
Committer: misakuo 
Committed: Mon Aug 7 10:45:50 2017 +0800

--
 .../sdk/src/main/java/com/taobao/weex/ui/component/WXSlider.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/43c5fdfd/android/sdk/src/main/java/com/taobao/weex/ui/component/WXSlider.java
--
diff --git 
a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXSlider.java 
b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXSlider.java
index dd593f9..8dc5918 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXSlider.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXSlider.java
@@ -188,7 +188,9 @@ public class WXSlider extends WXVContainer {
   mViewPager.setCurrentItem(initIndex);
   initIndex = -1;
 } else {
-  mViewPager.setCurrentItem(0);
+  if (mViewPager.getCurrentItem() == 0) {
+mViewPager.setCurrentItem(0);
+  }
 }
 if (mIndicator != null) {
   mIndicator.getHostView().forceLayout();



[05/13] incubator-weex git commit: * [jsfm] update jsfm version fix bug

2017-08-10 Thread kyork
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/ee918ad8/pre-build/native-bundle-main.js
--
diff --git a/pre-build/native-bundle-main.js b/pre-build/native-bundle-main.js
index 4da6843..779ffe1 100644
--- a/pre-build/native-bundle-main.js
+++ b/pre-build/native-bundle-main.js
@@ -1,8 +1,8 @@
-(this.nativeLog||function(e){console.log(e)})("START JS FRAMEWORK 0.21.7, 
Build 2017-08-08 16:14."),this.getJSFMVersion=function(){return"0.21.7"};var 
global=this,process={env:{}},setTimeout=global.setTimeout;!function(e,t){"object"==typeof
 exports&&"undefined"!=typeof module?t():"function"==typeof 
define&?define(t):t()}(0,function(){"use strict";function 
e(e){Zn.Document=e.Document,Zn.Element=e.Element,Zn.Comment=e.Comment,Zn.sendTasks=e.sendTasks}function
 t(e){}function n(e){}function r(e){}function o(e,t,n){}function 
i(e,t,n,r,o){var i=new 
Zn.Document(e,n.bundleUrl),a={},s=0;i.addCallback=function(e){return 
s++,a[s]=e,s},i.handleCallback=function(e,t,n){var r=a[e];return n& 
a[e],r(t)},Qn[e]=i;var 
u=Object.assign({Document:Zn.Document,Element:Zn.Element,Comment:Zn.Comment,sendTasks:Zn.sendTasks,id:e,options:n,data:r,document:i},o),c=[],l=[];for(var
 f in u)c.push(f),l.push(u[f]);return 
c.push(t),(new(Function.prototype.bind.apply(Function,[null].concat(c.apply
 (void 0,l),{document:i}}function a(e,t){}function s(e){delete Qn[e]}function 
u(e){return Qn[e].body.toJSON()}function c(e,t){var 
n={fireEvent:function(e,t,n,r,o){var i=Qn[e],a=i.getRef(t);return 
i.fireEvent(a,n,r,o)},callback:function(e,t,n,r){return 
Qn[e].handleCallback(t,n,r)}};if(Qn[e]&(t)){var r=[];return 
t.forEach(function(t){var o=n[t.method],i=[].concat(t.args);"function"==typeof 
o&&(i.unshift(e),r.push(o.apply(void 0,i)))}),r}}function l(e){return 
e&__esModule?e.default:e}function f(e,t){return 
t={exports:{}},e(t,t.exports),t.exports}function d(e){console.warn("[JS 
Framework] Vm#$ is deprecated, please use Vm#$vm instead");var 
t=this._ids[e];if(t)return t.vm}function p(e){var t=this._ids[e];if(t)return 
t.el}function h(e){var t=this._ids[e];if(t)return t.vm}function v(e){return 
this._app.differ.then(function(){e()})}function y(e,t){console.warn("[JS 
Framework] Vm#$scrollTo is deprecated, please use 
\"require('@weex-module/dom').scrollTo(el, options)\" instead
 ");var 
n=this.$el(e);if(n){this._app.requireModule("dom").scrollToElement(n.ref,{offset:t})}}function
 m(e,t,n){var 
r=this,o=this.$el(e);if(o&&){this._app.requireModule("animation").transition(o.ref,t,function(){for(var
 
e=[],i=arguments.length;i--;)e[i]=arguments[i];r._setStyle(o,t.styles),n&(void
 0,e)})}}function _(e){var t=this._app.options;return"function"==typeof 
e&&(console.warn("[JS Framework] the callback of Vm#$getConfig(callback) is 
deprecated, this api now can directly RETURN config info."),e(t)),t}function 
g(e,t){console.warn("[JS Framework] Vm#$sendHttp is deprecated, please use 
\"require('@weex-module/stream').sendHttp(params, callback)\" 
instead"),this._app.requireModule("stream").sendHttp(e,t)}function 
b(e){console.warn("[JS Framework] Vm#$openURL is deprecated, please use 
\"require('@weex-module/event').openURL(url)\" 
instead"),this._app.requireModule("event").openURL(e)}function 
w(e){console.warn("[JS Framework] Vm#$setTitle is deprecated, please u
 se \"require('@weex-module/pageInfo').setTitle(title)\" 
instead"),this._app.requireModule("pageInfo").setTitle(e)}function 
O(e,t){for(var n=[],r=arguments.length-2;r-- 
>0;)n[r]=arguments[r+2];console.warn("[JS Framework] Vm#$call is deprecated, 
please use \"require('@weex-module/moduleName')\" instead");var 
o=this._app.requireModule(e);o&[t]&[t].apply(o,n)}function E(e){for(var 
t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];if("function"==typeof 
Object.assign)Object.assign.apply(Object,[e].concat(t));else{var 
r=t.shift();for(var o in r)e[o]=r[o];t.length&(void 
0,[e].concat(t))}return e}function 
x(e,t,n,r){Object.defineProperty(e,t,{value:n,enumerable:!!r,writable:!0,configurable:!0})}function
 C(e,t){if(e.length){var n=e.indexOf(t);if(n>-1)return e.splice(n,1)}}function 
S(e,t){return _r.call(e,t)}function k(e,t){return function(n){var 
r=arguments.length;return 
r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}}function j(e){return 
null!==e&&"object"==typeof e}functi
 on A(e){return gr.call(e)===br}function I(e){var t=(e+"").charCodeAt(0);return 
36===t||95===t}function T(){return"object"==typeof 
nativeSet?nativeSet.create():new Kn}function N(e){var 
t=Object.prototype.toString.call(e);return 
t.substring(8,t.length-1).toLowerCase()}function P(e){return 
e.replace(Or,"").replace(Er,"")}function M(e){return e.replace(Cr,"")}function 
$(){this.id=Ir++,this.subs=[]}function 
R(e){$.target&($.target),$.target=e}function 
D(){$.target=Tr.pop()}function F(){$.target=null,Tr=[]}function 
L(e,t,n,r){r&(this,r);var o="function"==typeof 

[12/13] incubator-weex git commit: Merge branch '0.16-dev' of https://github.com/apache/incubator-weex into 0.16-dev

2017-08-10 Thread kyork
Merge branch '0.16-dev' of https://github.com/apache/incubator-weex into 
0.16-dev


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

Branch: refs/heads/0.16-dev
Commit: b639af258b5098924163a5048f6ae78d44e91604
Parents: c5f43fa d1bdd73
Author: YorkShen 
Authored: Thu Aug 10 20:44:12 2017 +0800
Committer: YorkShen 
Committed: Thu Aug 10 20:44:12 2017 +0800

--
 ios/sdk/WeexSDK.xcodeproj/project.pbxproj   |   6 +
 .../WeexSDK/Sources/Bridge/WXBridgeContext.m|  35 ++--
 ios/sdk/WeexSDK/Sources/Bridge/WXJSCoreBridge.m |  10 +-
 ios/sdk/WeexSDK/Sources/Debug/WXDebugTool.h |   4 +
 ios/sdk/WeexSDK/Sources/Debug/WXDebugTool.m |  10 ++
 .../WeexSDK/Sources/Manager/WXBridgeManager.m   |   4 +
 .../Sources/Manager/WXComponentFactory.h|   1 +
 .../Sources/Manager/WXComponentFactory.m|  23 +++
 .../Sources/Manager/WXComponentManager.m|  18 +-
 .../WeexSDK/Sources/Manager/WXModuleFactory.h   |   6 +
 .../WeexSDK/Sources/Manager/WXModuleFactory.m   |  24 +++
 .../WeexSDK/Sources/Manager/WXTracingManager.h  |  33 +++-
 .../WeexSDK/Sources/Manager/WXTracingManager.m  | 169 ---
 ios/sdk/WeexSDK/Sources/Model/WXComponent.m |   1 -
 ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m   |   6 +-
 ios/sdk/WeexSDK/Sources/Monitor/WXMonitor.m |   2 +
 .../Sources/Protocol/WXTracingProtocol.h|  29 
 .../Sources/View/WXComponent+ViewManagement.m   |   1 -
 ios/sdk/WeexSDK/Sources/WeexSDK.h   |   1 +
 19 files changed, 324 insertions(+), 59 deletions(-)
--




[07/13] incubator-weex git commit: Merge branch '0.16-dev' of https://github.com/apache/incubator-weex into 0.16-hub-dev

2017-08-10 Thread kyork
Merge branch '0.16-dev' of https://github.com/apache/incubator-weex into 
0.16-hub-dev

* '0.16-dev' of https://github.com/apache/incubator-weex: (28 commits)
  * [ios] fix unknown symbol
  * [test] tc update
  * [test] android border screen
  * [test] tc
  * [test] input
  * [test] update tc
  * [test] bug fix script on android
  * [test] update
  * [test] modal
  * [test] update
  * [test] add new script
  * [ios] copyright
  + [ios] extmodule for coverage
  * [ios] update wxtestdemo
  format code
  * [html5] fix tests & @notdanger.
  * [html5] rm transitionend listener for toast.
  * [html5] update
  * [html5] update
  * [html5] release vue-render 0.12.2
  ...


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

Branch: refs/heads/0.16-dev
Commit: 6fdcb19c5993ce3213c5816c93570b4c79e2f4af
Parents: ee918ad 78e9203
Author: atomtong 
Authored: Thu Aug 10 14:20:39 2017 +0800
Committer: atomtong 
Committed: Thu Aug 10 14:20:39 2017 +0800

--
 .../java/com/taobao/weex/bridge/WXBridge.java   |   8 +-
 .../com/taobao/weex/bridge/WXBridgeManager.java |  36 -
 .../taobao/weex/bridge/WXValidateProcessor.java |   7 +-
 .../java/com/taobao/weex/dom/WXDomObject.java   |  17 +-
 .../dom/action/AbstractAddElementAction.java|   2 +-
 html5/render/vue/README.md  |  15 ++
 html5/render/vue/components/image.js|  58 ++-
 html5/render/vue/config.js  |  10 +-
 html5/render/vue/core/node.js   |  27 ++--
 html5/render/vue/lib/gesture.js |   6 +
 html5/render/vue/modules/modal/toast.js |  23 +--
 html5/test/render/vue/core/node.js  |   2 +
 ios/.gitignore  |   1 +
 .../WeexDemo.xcodeproj/project.pbxproj  |  24 ++-
 ios/playground/WeexDemo/AppDelegate.m   |   8 +-
 ios/playground/WeexDemo/WXDemoViewController.m  |   2 -
 ios/playground/WeexDemo/WXExtModule.h   |  26 +++
 ios/playground/WeexDemo/WXExtModule.m   |  43 +
 ios/sdk/WeexSDK.xcodeproj/project.pbxproj   |   8 +
 ios/sdk/WeexSDK/Sources/WeexSDK.h   |   1 +
 package.json|   9 +-
 packages/weex-vue-render/README.md  |  15 ++
 packages/weex-vue-render/package.json   |   2 +-
 test/pages/components/iconfont.vue  |  71 
 test/pages/components/input-event.vue   |  65 
 test/pages/components/refresh-loading.vue   | 115 +
 test/pages/components/switch-event.vue  |  60 +++
 test/pages/components/web-event.vue |  56 +++
 test/pages/include/button.vue   | 162 +++
 test/pages/include/h1.vue   |  13 ++
 test/pages/include/h2.vue   |  13 ++
 test/pages/include/h3.vue   |  13 ++
 test/pages/include/hn.vue   |  47 ++
 test/pages/include/panel.vue| 141 
 test/pages/include/wxc-desc.vue |  66 
 test/pages/modules/animation-translate.vue  | 129 +++
 test/pages/modules/clipboard-event.vue  |  57 +++
 test/pages/modules/cover-generate.vue   |  53 ++
 test/pages/modules/downgrade-event.vue  |  74 +
 test/pages/modules/gesture-longpress.vue|  75 +
 test/pages/modules/modal-event.vue  |  61 +++
 test/pages/modules/picker-event.vue |  63 
 test/pages/modules/storage-event.vue|  59 +++
 test/pages/modules/stream-result.vue|  85 ++
 test/run.sh |  30 +++-
 test/screenshot/border-android.png  | Bin 156247 -> 158634 bytes
 test/scripts/components/iconfont.test.js|  34 
 test/scripts/components/input-event.test.js |  36 +
 test/scripts/components/refresh-loading.test.js |  38 +
 test/scripts/components/switch-event.test.js|  38 +
 test/scripts/components/web-event.test.js   |  30 
 .../scripts/modules/animation-translate.test.js |  40 +
 test/scripts/modules/clipboard-event.test.js|  35 
 test/scripts/modules/downgrade-event.test.js|  30 
 test/scripts/modules/gesture-longpress.test.js  |  37 +
 test/scripts/modules/modal-event.test.js|  35 
 test/scripts/modules/picker-event.test.js   |  41 +
 test/scripts/modules/storage-event.test.js  |  36 +
 test/scripts/modules/stream-result.test.js  |  34 
 test/scripts/util.js|  41 +
 

[11/13] incubator-weex git commit: Merge branch 'android-bugfix-slider' into 0.16-dev

2017-08-10 Thread kyork
Merge branch 'android-bugfix-slider' into 0.16-dev


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

Branch: refs/heads/0.16-dev
Commit: c5f43fa86c63d0f7942f0711ab74a600a953e3ef
Parents: 63c9c86 cc6fc5f
Author: YorkShen 
Authored: Thu Aug 10 20:40:48 2017 +0800
Committer: YorkShen 
Committed: Thu Aug 10 20:40:48 2017 +0800

--
 android/sdk/libs/armeabi/libweexjsc.so | Bin 7570504 -> 7570392 bytes
 android/sdk/libs/x86/libweexjsc.so | Bin 12121924 -> 7570392 bytes
 2 files changed, 0 insertions(+), 0 deletions(-)
--




[10/13] incubator-weex git commit: * [android] Fix slider bug

2017-08-10 Thread kyork
* [android] Fix slider bug


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

Branch: refs/heads/0.16-dev
Commit: cc6fc5fcc1dbcb33e07770cab92eb12870f1a0da
Parents: 1cadafc
Author: YorkShen 
Authored: Thu Aug 10 20:33:02 2017 +0800
Committer: YorkShen 
Committed: Thu Aug 10 20:33:02 2017 +0800

--
 .../sdk/src/main/java/com/taobao/weex/ui/component/WXSlider.java | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/cc6fc5fc/android/sdk/src/main/java/com/taobao/weex/ui/component/WXSlider.java
--
diff --git 
a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXSlider.java 
b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXSlider.java
index 8dc5918..dd593f9 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXSlider.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXSlider.java
@@ -188,9 +188,7 @@ public class WXSlider extends WXVContainer {
   mViewPager.setCurrentItem(initIndex);
   initIndex = -1;
 } else {
-  if (mViewPager.getCurrentItem() == 0) {
-mViewPager.setCurrentItem(0);
-  }
+  mViewPager.setCurrentItem(0);
 }
 if (mIndicator != null) {
   mIndicator.getHostView().forceLayout();



[03/13] incubator-weex git commit: Merge branch '0.15-hub-dev' into 0.16-hub-dev

2017-08-10 Thread kyork
Merge branch '0.15-hub-dev' into 0.16-hub-dev

* 0.15-hub-dev:
  * [android] fix Jni crash due to emoji


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

Branch: refs/heads/0.16-dev
Commit: fc62003b2e9e12f7551357c27bb6785def9d1b57
Parents: 1ebd484 fed8b64
Author: atomtong 
Authored: Wed Aug 9 09:39:20 2017 +0800
Committer: atomtong 
Committed: Wed Aug 9 09:39:20 2017 +0800

--
 android/sdk/libs/armeabi/libweexjsc.so | Bin 7570504 -> 7570392 bytes
 android/sdk/libs/x86/libweexjsc.so | Bin 12121924 -> 7570392 bytes
 2 files changed, 0 insertions(+), 0 deletions(-)
--




[13/13] incubator-weex git commit: Merge branch '0.16-dev' of https://github.com/apache/incubator-weex into 0.16-dev

2017-08-10 Thread kyork
Merge branch '0.16-dev' of https://github.com/apache/incubator-weex into 
0.16-dev


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

Branch: refs/heads/0.16-dev
Commit: ffe4951bc7d7dda6d728b2e8b9729f85b0caf684
Parents: b639af2 4bf47ed
Author: YorkShen 
Authored: Thu Aug 10 20:46:21 2017 +0800
Committer: YorkShen 
Committed: Thu Aug 10 20:46:21 2017 +0800

--
 .../WeexDemo.xcodeproj/project.pbxproj  |  6 ++
 ios/playground/WeexDemo/AppDelegate.m   |  2 +-
 .../WeexDemo/WXExtendCallNativeTest.h   | 25 ++
 .../WeexDemo/WXExtendCallNativeTest.m   | 47 
 ios/sdk/WeexSDK.xcodeproj/project.pbxproj   | 22 ++
 ios/sdk/WeexSDK/Sources/Bridge/WXJSCoreBridge.m | 13 
 ios/sdk/WeexSDK/Sources/Engine/WXSDKEngine.h| 10 +++
 ios/sdk/WeexSDK/Sources/Engine/WXSDKEngine.m|  6 ++
 .../Sources/Manager/WXExtendCallNativeManager.h | 26 +++
 .../Sources/Manager/WXExtendCallNativeManager.m | 80 
 .../Protocol/WXExtendCallNativeProtocol.h   | 47 
 ios/sdk/WeexSDK/Sources/WeexSDK.h   |  1 +
 12 files changed, 284 insertions(+), 1 deletion(-)
--




[08/13] incubator-weex git commit: Merge branch '0.15-hub-dev' into 0.16-github-dev

2017-08-10 Thread kyork
Merge branch '0.15-hub-dev' into 0.16-github-dev

* 0.15-hub-dev:
  + [android] ignore set index when current index not zero @notdanger
  * [android] fix Jni crash due to emoji


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

Branch: refs/heads/0.16-dev
Commit: 5d53100c74d7f45fba6296229e07020572e03e32
Parents: 78e9203 43c5fdf
Author: atomtong 
Authored: Thu Aug 10 14:25:26 2017 +0800
Committer: atomtong 
Committed: Thu Aug 10 14:25:26 2017 +0800

--
 android/sdk/libs/armeabi/libweexjsc.so  | Bin 7570504 -> 7570392 bytes
 android/sdk/libs/x86/libweexjsc.so  | Bin 12121924 -> 7570392 bytes
 .../com/taobao/weex/ui/component/WXSlider.java  |   4 +++-
 3 files changed, 3 insertions(+), 1 deletion(-)
--




[09/13] incubator-weex git commit: Merge branch '0.16-hub-dev' into 0.16-github-dev

2017-08-10 Thread kyork
Merge branch '0.16-hub-dev' into 0.16-github-dev

* 0.16-hub-dev:
  * [jsfm] update jsfm version fix bug


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

Branch: refs/heads/0.16-dev
Commit: 1cadafc736a85390d9ad56d8bac7fdd52f416240
Parents: 5d53100 6fdcb19
Author: atomtong 
Authored: Thu Aug 10 14:26:39 2017 +0800
Committer: atomtong 
Committed: Thu Aug 10 14:26:39 2017 +0800

--
 pre-build/native-bundle-main.js | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)
--




[01/13] incubator-weex git commit: * [android] fix Jni crash due to emoji

2017-08-10 Thread kyork
Repository: incubator-weex
Updated Branches:
  refs/heads/0.16-dev 4bf47ed41 -> ffe4951bc


* [android] fix Jni crash due to emoji


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

Branch: refs/heads/0.16-dev
Commit: fed8b64309fab398d008bdde3404adf3acbc1a95
Parents: eb48b94
Author: miomin <691292...@qq.com>
Authored: Fri Aug 4 14:50:14 2017 +0800
Committer: miomin <691292...@qq.com>
Committed: Fri Aug 4 14:50:14 2017 +0800

--
 android/sdk/libs/armeabi/libweexjsc.so | Bin 7570504 -> 7570392 bytes
 android/sdk/libs/x86/libweexjsc.so | Bin 12121924 -> 7570392 bytes
 2 files changed, 0 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/fed8b643/android/sdk/libs/armeabi/libweexjsc.so
--
diff --git a/android/sdk/libs/armeabi/libweexjsc.so 
b/android/sdk/libs/armeabi/libweexjsc.so
index 41b1ee8..a365bed 100755
Binary files a/android/sdk/libs/armeabi/libweexjsc.so and 
b/android/sdk/libs/armeabi/libweexjsc.so differ

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/fed8b643/android/sdk/libs/x86/libweexjsc.so
--
diff --git a/android/sdk/libs/x86/libweexjsc.so 
b/android/sdk/libs/x86/libweexjsc.so
index c45672a..a365bed 100755
Binary files a/android/sdk/libs/x86/libweexjsc.so and 
b/android/sdk/libs/x86/libweexjsc.so differ



[04/13] incubator-weex git commit: Merge branch '0.16-dev' of https://github.com/apache/incubator-weex into 0.16-hub-dev

2017-08-10 Thread kyork
Merge branch '0.16-dev' of https://github.com/apache/incubator-weex into 
0.16-hub-dev

* '0.16-dev' of https://github.com/apache/incubator-weex:
  * [ios] fix resourceloader load local resource
  * [ios]WXRecylerDragController remove Notes
  -[ios] remove drag methods from WXRecyclerComponent
  +[ios] add WXRecyclerDragController
  +[ios] recyclerComponent add drag method


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

Branch: refs/heads/0.16-dev
Commit: a661b6fc341df5a60ae8ba8e3e9dbf4e66d920c0
Parents: fc62003 f82e311
Author: atomtong 
Authored: Wed Aug 9 16:11:59 2017 +0800
Committer: atomtong 
Committed: Wed Aug 9 16:11:59 2017 +0800

--
 .../Component/Recycler/WXRecyclerComponent.m|  58 +-
 .../Recycler/WXRecyclerDragController.h |  52 +
 .../Recycler/WXRecyclerDragController.m | 208 +++
 .../WeexSDK/Sources/Loader/WXResourceLoader.m   |   2 +-
 4 files changed, 313 insertions(+), 7 deletions(-)
--




incubator-weex git commit: * [doc] Update doc of timer.

2017-07-13 Thread kyork
Repository: incubator-weex
Updated Branches:
  refs/heads/0.15-dev 1a9e53e2a -> ba53cd43d


* [doc] Update doc of timer.


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

Branch: refs/heads/0.15-dev
Commit: ba53cd43d953aa6093fcf1e3313fddadf1c94359
Parents: 1a9e53e
Author: YorkShen 
Authored: Thu Jul 13 17:50:24 2017 +0800
Committer: YorkShen 
Committed: Thu Jul 13 17:50:24 2017 +0800

--
 doc/source/cn/references/modules/timer.md | 47 
 doc/source/references/modules/timer.md| 59 ++
 2 files changed, 106 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/ba53cd43/doc/source/cn/references/modules/timer.md
--
diff --git a/doc/source/cn/references/modules/timer.md 
b/doc/source/cn/references/modules/timer.md
new file mode 100644
index 000..7bc87bb
--- /dev/null
+++ b/doc/source/cn/references/modules/timer.md
@@ -0,0 +1,47 @@
+---
+title: Timer
+type: references
+version: 0.10
+---
+
+# Timer
+Weex Timer可以用来延时启动一个一次性任务或者
重复任务。Timer会尽最大努力提供精确的延时,但是延时可能并不精确,延时时间很可能会è¶
…过用户期望的时间。实际上,timer仅仅
是为了支持HTML5中的polyfill,*不建议*开发者直接使用timer.
+
+## API
+Timer中延时的单位是毫秒,且延时时间应该为一个非负的int值(int值最大为0x7F).如果延时时间为负数或è€
…零,timer会将延时时间重置为0,即将该任务马上插å…
¥ä»»åŠ¡é˜Ÿåˆ—的尾部。
+
+### setTimeout(fn, timeout)
+`setTimeout()`会等待指定的时间,然后执行给出的函数。
+* 可以使用 
`clearTimeout()`去阻止`setTimeout()`运行如果此时对应的`setTimeout()`还没有运行的话。
+* 如果需要重复执行任务,使用`setInterval()`.
+
+ Arguments
+* `fn` (function): 待执行的函数.
+* `timeout` (number): 执行函数前的等待时间,单位为毫秒。 
+
+ Return value
+一个Number对象, 表示这个任务的id。把idä¼ å…
¥clearTimeout(fnId)中可以用来取消任务。   
+
+### setInterval(fn, interval)
+`setInterval()`每隔指定的时间间隔后,会执行对应的函数。`setInterval()`不会停止,除非`clearInterval()`被调用。`setInterval()`的返回值可以用来作为`setInterval()`的参数。
+
+ Arguments
+* `fn` (function): 待执行的函数。
+* `interval` (number): 
这次执行函数与下一次函数之间的时间间隔,单位为毫秒。
+
+ Return value
+一个Number对象,代表任务序列的id。可以把这个值传å…
¥`clearInterval`中来终止重复任务的执行。 
+
+### clearTimeout(fnId)
+`clearTimeout()`可以用来提前终止`setTimeout()`启动的任务。仅
当`setTimeout()`对应的任务没有被执行时,`clearTimeout()`才可以用来终止该任务,否则`clearTimeout()`没有任何效果。
+
+ Arguments
+* `fnId` (number): `setTimeout()`的返回值. 
+
+### clearInterval(fnId)
+ `clearInterval()`可以用来终止 `setInterval()`启动的任务序列。
+
+ Arguments
+* `fnId` (number): `setInterval()`的返回值
+
+[Try it](http://dotwe.org/vue/ad564965f1eac5a4bc86946ecff70a0c)

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/ba53cd43/doc/source/references/modules/timer.md
--
diff --git a/doc/source/references/modules/timer.md 
b/doc/source/references/modules/timer.md
new file mode 100644
index 000..6813d28
--- /dev/null
+++ b/doc/source/references/modules/timer.md
@@ -0,0 +1,59 @@
+---
+title: Timer
+type: references
+version: 0.10
+---
+
+# Timer
+
+Weex encapsulates a series of APIs in order to start/stop a one-time task or a 
repeated task at a fixed delay. Please note that this module don't provide an 
accuracy delay. It provides best-effort delivery, but the actual delay may 
still exceed the delay user wants if the corresponding thread is busy.
+Actually, this module is made for the polyfill of HTML5 timer APIs, developers 
**should not** use this module directly unless they know exactly what they are 
doing.
+
+## API
+
+All timeout or interval in this module are measured in milliseconds.
+Also, timeout and interval should be a non-negative integer(the max of integer 
is 0x7FFF). If timeout or interval is negative, then it will be reset to 
zero, e.g. the task will be put in the task queue 

incubator-weex git commit: * [doc] Change the doc of timer.

2017-07-19 Thread kyork
Repository: incubator-weex
Updated Branches:
  refs/heads/0.15-dev 10a074fd5 -> fb2ca3298


* [doc] Change the doc of timer.


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

Branch: refs/heads/0.15-dev
Commit: fb2ca329800a7d11d692f1f024ddb3caee4abd6f
Parents: 10a074f
Author: YorkShen 
Authored: Wed Jul 19 16:17:20 2017 +0800
Committer: YorkShen 
Committed: Wed Jul 19 16:17:20 2017 +0800

--
 doc/source/cn/references/modules/timer.md | 2 +-
 doc/source/references/modules/timer.md| 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/fb2ca329/doc/source/cn/references/modules/timer.md
--
diff --git a/doc/source/cn/references/modules/timer.md 
b/doc/source/cn/references/modules/timer.md
index 7bc87bb..3ac0c71 100644
--- a/doc/source/cn/references/modules/timer.md
+++ b/doc/source/cn/references/modules/timer.md
@@ -8,7 +8,7 @@ version: 0.10
 Weex Timer可以用来延时启动一个一次性任务或者
重复任务。Timer会尽最大努力提供精确的延时,但是延时可能并不精确,延时时间很可能会è¶
…过用户期望的时间。实际上,timer仅仅
是为了支持HTML5中的polyfill,*不建议*开发者直接使用timer.
 
 ## API
-Timer中延时的单位是毫秒,且延时时间应该为一个非负的int值(int值最大为0x7F).如果延时时间为负数或è€
…零,timer会将延时时间重置为0,即将该任务马上插å…
¥ä»»åŠ¡é˜Ÿåˆ—的尾部。
+Timer中延时的单位是毫秒,且延时时间应该为一个非负的**int**值(int值最大为0x7F).如果延时时间为零,会将该任务马上插å
…¥ä»»åŠ¡é˜Ÿåˆ—的尾部。对于其他非法值,timer的行为未定义。
 
 ### setTimeout(fn, timeout)
 `setTimeout()`会等待指定的时间,然后执行给出的函数。

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/fb2ca329/doc/source/references/modules/timer.md
--
diff --git a/doc/source/references/modules/timer.md 
b/doc/source/references/modules/timer.md
index 6813d28..9e7da63 100644
--- a/doc/source/references/modules/timer.md
+++ b/doc/source/references/modules/timer.md
@@ -11,8 +11,7 @@ Actually, this module is made for the polyfill of HTML5 timer 
APIs, developers *
 
 ## API
 
-All timeout or interval in this module are measured in milliseconds.
-Also, timeout and interval should be a non-negative integer(the max of integer 
is 0x7FFF). If timeout or interval is negative, then it will be reset to 
zero, e.g. the task will be put in the task queue immediately. 
+All timeout or interval in this module are measured in milliseconds. Also, 
timeout and interval should be a non-negative **integer**(the max of integer is 
0x7FFF). The behavior of invalid value for timeout or interval is undefined.
 
 ### setTimeout(fn, timeout)
 



incubator-weex git commit: * [android] Fix camera NPE.

2017-06-29 Thread kyork
Repository: incubator-weex
Updated Branches:
  refs/heads/0.14-dev 24fbad2f0 -> 5191cc380


* [android] Fix camera NPE.


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

Branch: refs/heads/0.14-dev
Commit: 5191cc380a8fca6069a3f549f6015d84d0972615
Parents: 24fbad2
Author: YorkShen 
Authored: Fri Jun 30 00:27:47 2017 +0800
Committer: YorkShen 
Committed: Fri Jun 30 00:27:47 2017 +0800

--
 .../src/main/java/com/taobao/weex/ui/component/WXComponent.java  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5191cc38/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
--
diff --git 
a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java 
b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
index 985b616..730d6da 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
@@ -949,7 +949,9 @@ public abstract class  WXComponent 
implements IWXObject, IWXActi
*/
   @CallSuper
   protected void onHostViewInitialized(T host){
-host.setCameraDistance(Float.MAX_VALUE);
+if(host!=null){
+  host.setCameraDistance(Float.MAX_VALUE);
+}
 if (mAnimationHolder != null) {
   //Performs cached animation
   mAnimationHolder.execute(mInstance, this);



incubator-weex git commit: * [test] Change test case of ImageQuality.

2017-06-28 Thread kyork
Repository: incubator-weex
Updated Branches:
  refs/heads/0.15-dev e4ba34646 -> 7a2337ee8


* [test] Change test case of ImageQuality.


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

Branch: refs/heads/0.15-dev
Commit: 7a2337ee84ab82c908d95c8b1a5592782c1356b5
Parents: e4ba346
Author: YorkShen 
Authored: Wed Jun 28 17:15:22 2017 +0800
Committer: YorkShen 
Committed: Wed Jun 28 17:15:22 2017 +0800

--
 .../java/com/taobao/weex/dom/WXAttrTest.java | 19 +--
 1 file changed, 9 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/7a2337ee/android/sdk/src/test/java/com/taobao/weex/dom/WXAttrTest.java
--
diff --git a/android/sdk/src/test/java/com/taobao/weex/dom/WXAttrTest.java 
b/android/sdk/src/test/java/com/taobao/weex/dom/WXAttrTest.java
index 17b38b8..c122418 100644
--- a/android/sdk/src/test/java/com/taobao/weex/dom/WXAttrTest.java
+++ b/android/sdk/src/test/java/com/taobao/weex/dom/WXAttrTest.java
@@ -18,11 +18,18 @@
  */
 package com.taobao.weex.dom;
 
+import static com.taobao.weex.common.Constants.Name.IMAGE_QUALITY;
+import static com.taobao.weex.common.Constants.Name.SRC;
+import static com.taobao.weex.common.Constants.Name.VALUE;
+import static com.taobao.weex.common.Constants.Value.HIGH;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.junit.Assert.assertEquals;
+
 import com.taobao.weappplus_sdk.BuildConfig;
 import com.taobao.weex.common.Constants;
 import com.taobao.weex.common.WXImageSharpen;
 import com.taobao.weex.utils.WXViewUtils;
-
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -30,14 +37,6 @@ import org.junit.runner.RunWith;
 import org.robolectric.RobolectricTestRunner;
 import org.robolectric.annotation.Config;
 
-import static com.taobao.weex.common.Constants.Name.IMAGE_QUALITY;
-import static com.taobao.weex.common.Constants.Name.SRC;
-import static com.taobao.weex.common.Constants.Name.VALUE;
-import static com.taobao.weex.common.Constants.Value.HIGH;
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.junit.Assert.assertEquals;
-
 @RunWith(RobolectricTestRunner.class)
 @Config(constants = BuildConfig.class)
 public class WXAttrTest {
@@ -65,7 +64,7 @@ public class WXAttrTest {
 
   @Test
   public void testGetImageQuality() throws Exception {
-assertEquals(WXImageQuality.LOW,attr.getImageQuality());
+assertEquals(WXImageQuality.AUTO,attr.getImageQuality());
 
 attr.put(IMAGE_QUALITY,HIGH);
 assertEquals(WXImageQuality.HIGH,attr.getImageQuality());



incubator-weex git commit: * [android] Refactor the code of resize attr on image.

2017-08-23 Thread kyork
Repository: incubator-weex
Updated Branches:
  refs/heads/0.16-dev 4025b5b36 -> 849ed3eb7


* [android] Refactor the code of resize attr on image.

The "resize" attribute on image doesn't depend on ImageView.setScaleType any 
longer, BitmapShader can do all the work.

* [android] Update WXImage


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

Branch: refs/heads/0.16-dev
Commit: 849ed3eb76fc5cf64065d5f8834cc5be3fa4f20c
Parents: 4025b5b
Author: YorkShen 
Authored: Tue Aug 22 11:37:04 2017 +0800
Committer: YorkShen 
Committed: Wed Aug 23 16:06:36 2017 +0800

--
 .../commons/adapter/FrescoImageComponent.java   |  2 +-
 .../com/taobao/weex/ui/component/WXImage.java   | 75 ++--
 .../com/taobao/weex/ui/view/WXImageView.java| 16 -
 .../com/taobao/weex/utils/ImageDrawable.java| 17 ++---
 4 files changed, 56 insertions(+), 54 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/849ed3eb/android/commons/src/main/java/com/alibaba/weex/commons/adapter/FrescoImageComponent.java
--
diff --git 
a/android/commons/src/main/java/com/alibaba/weex/commons/adapter/FrescoImageComponent.java
 
b/android/commons/src/main/java/com/alibaba/weex/commons/adapter/FrescoImageComponent.java
index 109302f..8573e8a 100644
--- 
a/android/commons/src/main/java/com/alibaba/weex/commons/adapter/FrescoImageComponent.java
+++ 
b/android/commons/src/main/java/com/alibaba/weex/commons/adapter/FrescoImageComponent.java
@@ -38,7 +38,7 @@ public class FrescoImageComponent extends WXImage {
   @Override
   protected ImageView initComponentHostView(@NonNull Context context) {
 FrescoImageView view = new FrescoImageView(context);
-view.setScaleType(ImageView.ScaleType.FIT_XY);
+view.setScaleType(WXImage.DEFAULT_SCALE_TYPE);
 
 return view;
   }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/849ed3eb/android/sdk/src/main/java/com/taobao/weex/ui/component/WXImage.java
--
diff --git 
a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXImage.java 
b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXImage.java
index db58d99..8fda814 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXImage.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXImage.java
@@ -31,7 +31,6 @@ import android.support.v4.content.ContextCompat;
 import android.text.TextUtils;
 import android.widget.ImageView;
 import android.widget.ImageView.ScaleType;
-
 import com.taobao.weex.WXEnvironment;
 import com.taobao.weex.WXSDKInstance;
 import com.taobao.weex.adapter.IWXImgLoaderAdapter;
@@ -51,12 +50,11 @@ import com.taobao.weex.ui.view.border.BorderDrawable;
 import com.taobao.weex.utils.ImageDrawable;
 import com.taobao.weex.utils.ImgURIUtil;
 import com.taobao.weex.utils.SingleFunctionParser;
-import com.taobao.weex.utils.WXViewToImageUtil;
 import com.taobao.weex.utils.WXDomUtils;
 import com.taobao.weex.utils.WXLogUtils;
 import com.taobao.weex.utils.WXUtils;
+import com.taobao.weex.utils.WXViewToImageUtil;
 import com.taobao.weex.utils.WXViewUtils;
-
 import java.lang.reflect.InvocationTargetException;
 import java.util.Arrays;
 import java.util.HashMap;
@@ -71,6 +69,7 @@ public class WXImage extends WXComponent {
 
   public static final String SUCCEED = "success";
   public static final String ERRORDESC = "errorDesc";
+  public final static ScaleType DEFAULT_SCALE_TYPE = ScaleType.FIT_XY;
 
   private String mSrc;
   private int mBlurRadius;
@@ -102,7 +101,7 @@ public class WXImage extends WXComponent {
   @Override
   protected ImageView initComponentHostView(@NonNull Context context) {
 WXImageView view = new WXImageView(context);
-view.setScaleType(ScaleType.FIT_XY);
+view.setScaleType(DEFAULT_SCALE_TYPE);
 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
   view.setCropToPadding(true);
 }
@@ -153,32 +152,23 @@ public class WXImage extends WXComponent {
 
   @WXComponentProp(name = Constants.Name.RESIZE_MODE)
   public void setResizeMode(String resizeMode) {
-(getHostView()).setScaleType(getResizeMode(resizeMode));
-  }
-
-  private ScaleType getResizeMode(String resizeMode) {
-ScaleType scaleType = ScaleType.FIT_XY;
-if (TextUtils.isEmpty(resizeMode)) {
-  return scaleType;
-}
-
-switch (resizeMode) {
-  case "cover":
-scaleType = ScaleType.CENTER_CROP;
-break;
-  case "contain":
-scaleType = 

incubator-weex git commit: * [test] update apk name in test/script/util.js

2017-05-03 Thread kyork
Repository: incubator-weex
Updated Branches:
  refs/heads/0.13-dev bb33a758c -> e704ea25b


* [test] update apk name in test/script/util.js


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

Branch: refs/heads/0.13-dev
Commit: e704ea25bcc55e45d87cd74aa3ffaa291a6721f8
Parents: bb33a75
Author: YorkShen 
Authored: Wed May 3 19:57:46 2017 +0800
Committer: YorkShen 
Committed: Wed May 3 19:57:46 2017 +0800

--
 test/scripts/util.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/e704ea25/test/scripts/util.js
--
diff --git a/test/scripts/util.js b/test/scripts/util.js
index 81dc100..d09f16e 100644
--- a/test/scripts/util.js
+++ b/test/scripts/util.js
@@ -42,7 +42,7 @@ var androidOpts = {
   platformName: 'Android',
   target: 'android',
   slowEnv: isRunInCI,
-  app: path.join(__dirname, '..', 
`../android/playground/app/build/outputs/apk/playground.apk`)
+  app: path.join(__dirname, '..', 
`../android/playground/app/build/outputs/apk/playground-debug.apk`)
 };
 
 var androidChromeOpts = {



[1/2] incubator-weex git commit: Module monitor info

2017-05-17 Thread kyork
Repository: incubator-weex
Updated Branches:
  refs/heads/0.13-dev 62d1d3f83 -> 54d077d41


Module monitor info


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

Branch: refs/heads/0.13-dev
Commit: 1581e3c35a48096973bcd2d2aef9a2e048b054b5
Parents: 834191e
Author: yilingwj 
Authored: Wed May 17 11:36:55 2017 +0800
Committer: yilingwj 
Committed: Wed May 17 11:36:55 2017 +0800

--
 .../taobao/weex/adapter/IWXUserTrackAdapter.java   |  2 +-
 .../com/taobao/weex/bridge/WXModuleManager.java| 17 +
 2 files changed, 18 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/1581e3c3/android/sdk/src/main/java/com/taobao/weex/adapter/IWXUserTrackAdapter.java
--
diff --git 
a/android/sdk/src/main/java/com/taobao/weex/adapter/IWXUserTrackAdapter.java 
b/android/sdk/src/main/java/com/taobao/weex/adapter/IWXUserTrackAdapter.java
index a5201c2..604b461 100644
--- a/android/sdk/src/main/java/com/taobao/weex/adapter/IWXUserTrackAdapter.java
+++ b/android/sdk/src/main/java/com/taobao/weex/adapter/IWXUserTrackAdapter.java
@@ -41,7 +41,7 @@ public interface IWXUserTrackAdapter {
   String DOM_MODULE = "domModule";
   String JS_BRIDGE = "jsBridge";
   String STREAM_MODULE = "streamModule";
-
+  String INVOKE_MODULE = "invokeModule";
 
   void commit(Context context, String eventId, String type, WXPerformance 
perf, Map params);
 }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/1581e3c3/android/sdk/src/main/java/com/taobao/weex/bridge/WXModuleManager.java
--
diff --git 
a/android/sdk/src/main/java/com/taobao/weex/bridge/WXModuleManager.java 
b/android/sdk/src/main/java/com/taobao/weex/bridge/WXModuleManager.java
index 2b5ee4a..9ec961b 100644
--- a/android/sdk/src/main/java/com/taobao/weex/bridge/WXModuleManager.java
+++ b/android/sdk/src/main/java/com/taobao/weex/bridge/WXModuleManager.java
@@ -26,6 +26,7 @@ import android.view.Menu;
 import com.alibaba.fastjson.JSONArray;
 import com.taobao.weex.WXSDKInstance;
 import com.taobao.weex.WXSDKManager;
+import com.taobao.weex.adapter.IWXUserTrackAdapter;
 import com.taobao.weex.common.Destroyable;
 import com.taobao.weex.common.WXException;
 import com.taobao.weex.common.WXModule;
@@ -35,6 +36,7 @@ import com.taobao.weex.dom.action.Actions;
 import com.taobao.weex.ui.module.WXTimerModule;
 import com.taobao.weex.utils.WXLogUtils;
 
+import java.io.Serializable;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
@@ -56,6 +58,13 @@ public class WXModuleManager {
   private static Map sDomModuleMap = new HashMap<>();
 
   /**
+   * monitor keys
+   */
+  private static String MONITOR_ERROR_CODE = "errCode";
+  private static String MONITOR_ARG = "arg";
+  private static String MONITOR_ERROR_MSG = "errMsg";
+
+  /**
* module object dictionary
* K : instanceId, V : Modules
*/
@@ -144,6 +153,14 @@ public class WXModuleManager {
 final Invoker invoker = factory.getMethodInvoker(methodStr);
 try {
   if(instance != null) {
+IWXUserTrackAdapter userTrackAdapter = 
WXSDKManager.getInstance().getIWXUserTrackAdapter();
+if(userTrackAdapter != null) {
+  HashMap data = new HashMap();
+  data.put(MONITOR_ERROR_CODE, "101");
+  data.put(MONITOR_ARG, moduleStr + "." + methodStr);
+  data.put(MONITOR_ERROR_MSG, instance.getBundleUrl());
+  userTrackAdapter.commit(instance.getContext(), null, 
IWXUserTrackAdapter.INVOKE_MODULE, null, data);
+}
 return dispatchCallModuleMethod(instance,wxModule,args,invoker);
   } else {
 WXLogUtils.e("callModuleMethod >>> instance is null");



[2/2] incubator-weex git commit: Merge branch '0.13-dev' into 0.13-yiling

2017-05-17 Thread kyork
Merge branch '0.13-dev' into 0.13-yiling


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

Branch: refs/heads/0.13-dev
Commit: 54d077d41f578451e8306ec23dd97acbfb4893e2
Parents: 1581e3c 62d1d3f
Author: yilingwj 
Authored: Wed May 17 17:43:16 2017 +0800
Committer: yilingwj 
Committed: Wed May 17 17:43:16 2017 +0800

--
 ios/sdk/WeexSDK/Sources/Engine/WXSDKEngine.m | 9 ++---
 ios/sdk/WeexSDK/Sources/Model/WXComponent.m  | 1 +
 ios/sdk/WeexSDK/Sources/Utility/WXDefine.h   | 2 ++
 3 files changed, 9 insertions(+), 3 deletions(-)
--




incubator-weex git commit: * Add License Gradle Plugin for format license in the head of android src file.

2017-06-08 Thread kyork
Repository: incubator-weex
Updated Branches:
  refs/heads/0.14-dev c109e10c7 -> 4bc03cc67


* Add License Gradle Plugin for format license in the head of android src file.


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

Branch: refs/heads/0.14-dev
Commit: 4bc03cc67efc338295cbe77f718bdb152ad49cc6
Parents: c109e10
Author: YorkShen 
Authored: Thu Jun 8 16:24:54 2017 +0800
Committer: YorkShen 
Committed: Thu Jun 8 16:24:54 2017 +0800

--
 LICENSE | 20 ++-
 POSSIBLE-NOTICES-FOR-BIN-DIST   |  3 +++
 android/sdk/build.gradle| 12 ++-
 .../com/taobao/weex/LayoutFinishListener.java   | 18 +
 .../taobao/weex/adapter/ICrashInfoReporter.java | 18 +
 .../weex/dom/action/ExecutableRenderAction.java | 18 +
 .../weex/dom/action/ModuleInvocationAction.java | 18 +
 .../taobao/weex/utils/WXDataStructureUtil.java  | 21 ++--
 8 files changed, 124 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/4bc03cc6/LICENSE
--
diff --git a/LICENSE b/LICENSE
index 8f1309a..c54354a 100644
--- a/LICENSE
+++ b/LICENSE
@@ -284,4 +284,22 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 
DAMAGES OR OTHER
 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 THE SOFTWARE.
-*/
\ No newline at end of file
+*/
+
+For Guava
+android/sdk/src/main/java/com/taobao/weex/utils/WXDataStructureUtil.java
+/*
+ * Copyright (C) 2007 The Guava Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/4bc03cc6/POSSIBLE-NOTICES-FOR-BIN-DIST
--
diff --git a/POSSIBLE-NOTICES-FOR-BIN-DIST b/POSSIBLE-NOTICES-FOR-BIN-DIST
index 052f78c..350a00b 100644
--- a/POSSIBLE-NOTICES-FOR-BIN-DIST
+++ b/POSSIBLE-NOTICES-FOR-BIN-DIST
@@ -97,3 +97,6 @@ by The Android Open Source Project , licensed under the 
Apache 2.0 License.
 
 This product contains software SDWebImage(https://github.com/rs/SDWebImage) 
developed
 by Olivier Poitrey  , licensed under the MIT License.
+
+This product contains software Guava(https://github.com/google/guava) developed
+by google  , licensed under the Apache License.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/4bc03cc6/android/sdk/build.gradle
--
diff --git a/android/sdk/build.gradle b/android/sdk/build.gradle
index 7593dbd..c8c235b 100755
--- a/android/sdk/build.gradle
+++ b/android/sdk/build.gradle
@@ -4,6 +4,10 @@ buildscript {
 }
 }
 
+plugins {
+id "com.github.hierynomus.license" version "0.14.0"
+}
+
 apply plugin: 'com.android.library'
 apply plugin: 'checkstyle'
 
@@ -150,4 +154,10 @@ dependencies {
 testCompile 'org.robolectric:robolectric:3.0'
 testCompile "org.robolectric:shadows-httpclient:3.0"
 testCompile 'org.json:json:20160212'
-}
\ No newline at end of file
+}
+
+license {
+header = file('../license/LICENSE')
+excludes(["com/taobao/weex/dom/flex/*.java"])
+}
+preBuild.dependsOn licenseFormat
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/4bc03cc6/android/sdk/src/main/java/com/taobao/weex/LayoutFinishListener.java
--
diff --git 
a/android/sdk/src/main/java/com/taobao/weex/LayoutFinishListener.java 
b/android/sdk/src/main/java/com/taobao/weex/LayoutFinishListener.java
index 5c49e5e..b863316 100644
--- a/android/sdk/src/main/java/com/taobao/weex/LayoutFinishListener.java
+++ b/android/sdk/src/main/java/com/taobao/weex/LayoutFinishListener.java
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software 

incubator-weex git commit: * [Android] Support rotateX and rotateY, optimize animation as well.

2017-06-08 Thread kyork
Repository: incubator-weex
Updated Branches:
  refs/heads/0.14-dev bd00ba86b -> cd911636d


* [Android] Support rotateX and rotateY, optimize animation as well.

@notdanger

* [Use LayoutParamsProperty instead of DimensionUpdateListener to achieve 
height/width animation.](http://dotwe.org/vue/c7a70462a136b61e11ab37f384862003)
* [Support rotateX and 
rotateY.](http://dotwe.org/vue/e712dd2ad4df470bab940d8e0e6d052d).
* Stop remove transform and transform-origin from WXStyle in UpdateStyleAction.
* Stop execute animation callback if corresponding WXInstance is destroyed when 
animation finished.

Corresponding [JIRA issue](https://issues.apache.org/jira/browse/WEEX-38).


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

Branch: refs/heads/0.14-dev
Commit: cd911636d6ca25d12470a9c492bdfb5beb7e169d
Parents: bd00ba8
Author: YorkShen 
Authored: Mon Jun 5 14:59:31 2017 +0800
Committer: YorkShen 
Committed: Thu Jun 8 17:02:42 2017 +0800

--
 .../taobao/weex/dom/action/AnimationAction.java | 37 
 .../weex/dom/action/UpdateStyleAction.java  |  4 +-
 .../ui/animation/DimensionUpdateListener.java   | 88 
 .../weex/ui/animation/HeightProperty.java   | 35 
 .../weex/ui/animation/LayoutParamsProperty.java | 64 ++
 .../weex/ui/animation/WXAnimationBean.java  | 72 ++--
 .../taobao/weex/ui/animation/WidthProperty.java | 35 
 .../taobao/weex/ui/component/WXComponent.java   | 16 +++-
 8 files changed, 213 insertions(+), 138 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/cd911636/android/sdk/src/main/java/com/taobao/weex/dom/action/AnimationAction.java
--
diff --git 
a/android/sdk/src/main/java/com/taobao/weex/dom/action/AnimationAction.java 
b/android/sdk/src/main/java/com/taobao/weex/dom/action/AnimationAction.java
index 6f811fd..59afbca 100644
--- a/android/sdk/src/main/java/com/taobao/weex/dom/action/AnimationAction.java
+++ b/android/sdk/src/main/java/com/taobao/weex/dom/action/AnimationAction.java
@@ -38,7 +38,6 @@ import android.view.animation.AccelerateInterpolator;
 import android.view.animation.DecelerateInterpolator;
 import android.view.animation.Interpolator;
 import android.view.animation.LinearInterpolator;
-
 import com.alibaba.fastjson.JSONObject;
 import com.taobao.weex.WXSDKInstance;
 import com.taobao.weex.WXSDKManager;
@@ -48,9 +47,10 @@ import com.taobao.weex.dom.RenderAction;
 import com.taobao.weex.dom.RenderActionContext;
 import com.taobao.weex.dom.WXDomObject;
 import com.taobao.weex.ui.animation.BackgroundColorProperty;
-import com.taobao.weex.ui.animation.DimensionUpdateListener;
+import com.taobao.weex.ui.animation.HeightProperty;
 import com.taobao.weex.ui.animation.WXAnimationBean;
 import com.taobao.weex.ui.animation.WXAnimationModule;
+import com.taobao.weex.ui.animation.WidthProperty;
 import com.taobao.weex.ui.component.WXComponent;
 import com.taobao.weex.ui.view.border.BorderDrawable;
 import com.taobao.weex.utils.SingleFunctionParser;
@@ -58,7 +58,6 @@ import com.taobao.weex.utils.WXLogUtils;
 import com.taobao.weex.utils.WXResourceUtils;
 import com.taobao.weex.utils.WXUtils;
 import com.taobao.weex.utils.WXViewUtils;
-
 import java.util.HashMap;
 import java.util.List;
 
@@ -190,28 +189,28 @@ class AnimationAction implements DOMAction, RenderAction {
   WXResourceUtils.getColor(style.backgroundColor)));
 }
   }
-  if (style.getPivot() != null) {
-Pair pair = style.getPivot();
-target.setPivotX(pair.first);
-target.setPivotY(pair.second);
-  }
-  animator = ObjectAnimator.ofPropertyValuesHolder(
-  target, holders.toArray(new PropertyValuesHolder[holders.size()]));
-  animator.setStartDelay(mAnimationBean.delay);
+
   if (target.getLayoutParams() != null &&
   (!TextUtils.isEmpty(style.width) || 
!TextUtils.isEmpty(style.height))) {
-DimensionUpdateListener listener = new DimensionUpdateListener(target);
 ViewGroup.LayoutParams layoutParams = target.getLayoutParams();
 if (!TextUtils.isEmpty(style.width)) {
-  listener.setWidth(layoutParams.width,
-(int) 
WXViewUtils.getRealPxByWidth(WXUtils.getFloat(style.width), viewPortWidth));
+  holders.add(PropertyValuesHolder.ofInt(new WidthProperty(), 
layoutParams.width,
+  (int) 
WXViewUtils.getRealPxByWidth(WXUtils.getFloat(style.width), viewPortWidth)));
 }
 if 

incubator-weex git commit: * [android] Update Build.VERSION.SKD_INT to 24

2017-05-26 Thread kyork
Repository: incubator-weex
Updated Branches:
  refs/heads/0.13-dev da396f4d4 -> 50947769c


* [android] Update Build.VERSION.SKD_INT to 24


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

Branch: refs/heads/0.13-dev
Commit: 50947769c15994a299caffd09d11fc7b7bd26a6b
Parents: da396f4
Author: YorkShen 
Authored: Sat May 27 10:59:17 2017 +0800
Committer: YorkShen 
Committed: Sat May 27 10:59:17 2017 +0800

--
 android/sdk/src/main/java/com/taobao/weex/utils/WXViewUtils.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/50947769/android/sdk/src/main/java/com/taobao/weex/utils/WXViewUtils.java
--
diff --git a/android/sdk/src/main/java/com/taobao/weex/utils/WXViewUtils.java 
b/android/sdk/src/main/java/com/taobao/weex/utils/WXViewUtils.java
index cde5de9..c6120d5 100644
--- a/android/sdk/src/main/java/com/taobao/weex/utils/WXViewUtils.java
+++ b/android/sdk/src/main/java/com/taobao/weex/utils/WXViewUtils.java
@@ -28,7 +28,6 @@ import android.graphics.RectF;
 import android.graphics.drawable.Drawable;
 import android.graphics.drawable.LayerDrawable;
 import android.os.Build;
-import android.os.Build.VERSION_CODES;
 import android.support.annotation.IntDef;
 import android.support.annotation.NonNull;
 import android.support.annotation.Nullable;
@@ -408,7 +407,7 @@ public class WXViewUtils {
* As the compile version of weex_sdk is 23, so API level 24 has to be 
hard-code.
*/
   private static boolean clipCanvasIfAnimationExist() {
-return Build.VERSION.SDK_INT != VERSION_CODES.N;
+return Build.VERSION.SDK_INT != 24;
   }
 
   /**



incubator-weex git commit: * [android] downgrade to api 23 as compiling issues.

2017-05-26 Thread kyork
Repository: incubator-weex
Updated Branches:
  refs/heads/0.13-dev 50947769c -> d7f53c19c


* [android] downgrade to api 23 as compiling issues.


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

Branch: refs/heads/0.13-dev
Commit: d7f53c19c48ad6062fca0f31648878038eba4e32
Parents: 5094776
Author: YorkShen 
Authored: Sat May 27 11:19:06 2017 +0800
Committer: YorkShen 
Committed: Sat May 27 11:19:06 2017 +0800

--
 android/build.gradle | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/d7f53c19/android/build.gradle
--
diff --git a/android/build.gradle b/android/build.gradle
index 25d281b..746e508 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -29,12 +29,12 @@ subprojects {
 }
 }
 ext {
-compileSdkVersion=24
-buildToolsVersion="24.0.3"
+compileSdkVersion=23
+buildToolsVersion="23.0.3"
 minSdkVersion=14
 appMinSdkVersion=15
-targetSdkVersion=24
-supportLibVersion="24.2.0"
+targetSdkVersion=23
+supportLibVersion="23.4.0"
 fastjsonLibVersion="1.1.46.android"
 }
 }



[1/2] incubator-weex git commit: * [android] Fix the problem of clearTimeout and clearInterval.

2017-06-13 Thread kyork
Repository: incubator-weex
Updated Branches:
  refs/heads/0.14-dev 64b77b1d4 -> 6dc2c8ee1


* [android] Fix the problem of clearTimeout and clearInterval.

Due the implementation of [int 
auto-boxing](https://stackoverflow.com/questions/3130311/weird-integer-boxing-in-java)
 and 
[messageQueue](https://stackoverflow.com/questions/36190851/android-os-handler-removemessages-doesnt-work-when-poxing-value-type-as-msg-obj),
 clearTimeout and clearTimeout won't work when funId is greater than 127. It 
works fine when funId is smaller than 127.

Ref this [demo](http://dotwe.org/vue/1c7b541231eb86db98afe3c1b48bcdcc)


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

Branch: refs/heads/0.14-dev
Commit: fefe2e8a8787b126c22c227dbac39bb979300579
Parents: 202c180
Author: YorkShen 
Authored: Mon Jun 12 12:06:43 2017 +0800
Committer: YorkShen 
Committed: Mon Jun 12 14:39:53 2017 +0800

--
 .../taobao/weex/ui/module/WXTimerModule.java| 87 +++-
 .../weex/ui/module/WXTimerModuleTest.java   | 44 +++---
 2 files changed, 80 insertions(+), 51 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/fefe2e8a/android/sdk/src/main/java/com/taobao/weex/ui/module/WXTimerModule.java
--
diff --git 
a/android/sdk/src/main/java/com/taobao/weex/ui/module/WXTimerModule.java 
b/android/sdk/src/main/java/com/taobao/weex/ui/module/WXTimerModule.java
index 2220859..caa28a6 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/module/WXTimerModule.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/module/WXTimerModule.java
@@ -18,56 +18,61 @@
  */
 package com.taobao.weex.ui.module;
 
+import static com.taobao.weex.bridge.WXBridgeManager.KEY_ARGS;
+import static com.taobao.weex.bridge.WXBridgeManager.KEY_METHOD;
+import static com.taobao.weex.bridge.WXBridgeManager.METHOD_CALLBACK;
+import static com.taobao.weex.bridge.WXBridgeManager.METHOD_CALL_JS;
+import static com.taobao.weex.common.WXJSBridgeMsgType.MODULE_INTERVAL;
+import static com.taobao.weex.common.WXJSBridgeMsgType.MODULE_TIMEOUT;
+
 import android.os.Handler;
 import android.os.Message;
+import android.support.annotation.IntDef;
 import android.support.annotation.IntRange;
 import android.support.annotation.VisibleForTesting;
-
+import android.util.SparseArray;
 import com.taobao.weex.WXSDKManager;
 import com.taobao.weex.annotation.JSMethod;
 import com.taobao.weex.bridge.WXBridgeManager;
 import com.taobao.weex.bridge.WXHashMap;
 import com.taobao.weex.bridge.WXJSObject;
 import com.taobao.weex.common.Destroyable;
-import com.taobao.weex.common.WXJSBridgeMsgType;
 import com.taobao.weex.common.WXModule;
 import com.taobao.weex.dom.action.Actions;
 import com.taobao.weex.utils.WXJsonUtils;
 import com.taobao.weex.utils.WXLogUtils;
-
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
 import java.util.ArrayList;
 import java.util.HashMap;
 
-import static com.taobao.weex.bridge.WXBridgeManager.KEY_ARGS;
-import static com.taobao.weex.bridge.WXBridgeManager.KEY_METHOD;
-import static com.taobao.weex.bridge.WXBridgeManager.METHOD_CALLBACK;
-import static com.taobao.weex.bridge.WXBridgeManager.METHOD_CALL_JS;
-
 public class WXTimerModule extends WXModule implements Destroyable, 
Handler.Callback {
 
+  @IntDef({MODULE_TIMEOUT, MODULE_INTERVAL})
+  @Retention(RetentionPolicy.SOURCE)
+  @interface MessageType {}
+
   private final static String TAG = "timer";
   private Handler handler;
+  private SparseArray antiIntAutoBoxing;
 
   public WXTimerModule() {
 handler = new Handler(WXBridgeManager.getInstance().getJSLooper(), this);
+antiIntAutoBoxing = new SparseArray<>();
   }
 
-  @VisibleForTesting
-  void setHandler(Handler handler) {
-this.handler = handler;
-  }
 
   @JSMethod(uiThread = false)
   public void setTimeout(@IntRange(from = 1) int funcId, @IntRange(from = 0) 
int delay) {
 if(mWXSDKInstance != null) {
-  postOrHoldMessage(WXJSBridgeMsgType.MODULE_TIMEOUT, funcId, delay, 
Integer.parseInt(mWXSDKInstance.getInstanceId()));
+  postOrHoldMessage(MODULE_TIMEOUT, funcId, delay, 
Integer.parseInt(mWXSDKInstance.getInstanceId()));
 }
   }
 
   @JSMethod(uiThread = false)
   public void setInterval(@IntRange(from = 1) int funcId, @IntRange(from = 0) 
int interval) {
 if(mWXSDKInstance != null) {
-  postOrHoldMessage(WXJSBridgeMsgType.MODULE_INTERVAL, funcId, interval, 
Integer.parseInt(mWXSDKInstance.getInstanceId()));
+  postOrHoldMessage(MODULE_INTERVAL, 

[2/2] incubator-weex git commit: Merge branch 'android-bugfix-timer' of https://github.com/YorkShen/incubator-weex into 0.14-dev

2017-06-13 Thread kyork
Merge branch 'android-bugfix-timer' of 
https://github.com/YorkShen/incubator-weex into 0.14-dev


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

Branch: refs/heads/0.14-dev
Commit: 6dc2c8ee1c1baeb02c389162e4410e71f38c6b0f
Parents: 64b77b1 fefe2e8
Author: YorkShen 
Authored: Tue Jun 13 15:25:08 2017 +0800
Committer: YorkShen 
Committed: Tue Jun 13 15:25:08 2017 +0800

--
 .../taobao/weex/ui/module/WXTimerModule.java| 87 +++-
 .../weex/ui/module/WXTimerModuleTest.java   | 44 +++---
 2 files changed, 80 insertions(+), 51 deletions(-)
--




incubator-weex git commit: + [test] Add maraca test case of timer

2017-05-02 Thread kyork
Repository: incubator-weex
Updated Branches:
  refs/heads/0.13-dev 0c50691dd -> 9cf46623b


+ [test] Add maraca test case of timer


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

Branch: refs/heads/0.13-dev
Commit: 9cf46623bed016816fefb8c2d5b18e142094a23e
Parents: 0c50691
Author: YorkShen 
Authored: Fri Apr 21 16:45:17 2017 +0800
Committer: YorkShen 
Committed: Tue May 2 16:01:58 2017 +0800

--
 test/pages/modules/vue_timer.vue |  75 ++
 test/pages/modules/we_timer.we   |  73 ++
 test/scripts/components/text.test.js |   2 +-
 test/scripts/modules/timer.test.js   | 100 ++
 4 files changed, 249 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9cf46623/test/pages/modules/vue_timer.vue
--
diff --git a/test/pages/modules/vue_timer.vue b/test/pages/modules/vue_timer.vue
new file mode 100644
index 000..a4bd79e
--- /dev/null
+++ b/test/pages/modules/vue_timer.vue
@@ -0,0 +1,75 @@
+
+
+setTimeout timeout=5000
+
+SetTimeOut
+ClearTimeOut
+
+{{timeout_content}}
+
+setInterval interval=5000
+
+SetInterval
+ClearInterval
+
+{{interval_content}}
+
+
+
+
+.wrapper {
+height: 100px;
+width: 750px;
+background-color: yellow;
+align-items: center;
+flex-direction: row
+}
+
+.t {
+font-size: 36px;
+color: #ff;
+align-items: center;
+flex: 1;
+text-align: center;
+}
+
+.content {
+font-size: 32px;
+background-color: blue;
+color: black;
+text-align: center;
+}
+
+
+
+var tfnId;
+var ifnId;
+module.exports = {
+data: function () {
+return {
+timeout_content: 0,
+interval_content: 0
+}
+},
+methods: {
+stimeout: function () {
+var self = this;
+tfnId = setTimeout(function () {
+self.timeout_content += 1
+}, 5000);
+},
+ctimeout: function () {
+clearTimeout(tfnId)
+},
+sinterval: function () {
+var self = this;
+ifnId = setInterval(function () {
+self.interval_content += 1
+}, 5000);
+},
+cinterval: function () {
+clearInterval(ifnId)
+}
+}
+}
+
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9cf46623/test/pages/modules/we_timer.we
--
diff --git a/test/pages/modules/we_timer.we b/test/pages/modules/we_timer.we
new file mode 100644
index 000..ce683c5
--- /dev/null
+++ b/test/pages/modules/we_timer.we
@@ -0,0 +1,73 @@
+
+
+setTimeout timeout=5000
+
+SetTimeOut
+ClearTimeOut
+
+{{timeout_content}}
+
+setInterval interval=5000
+
+SetInterval
+ClearInterval
+
+{{interval_content}}
+
+
+
+
+.wrapper {
+height: 100px;
+width: 750px;
+background-color: yellow;
+align-items: center;
+flex-direction: row
+}
+
+.t {
+font-size: 36px;
+color: #ff;
+align-items: center;
+flex: 1;
+text-align: center;
+}
+
+.content {
+font-size: 32px;
+background-color: blue;
+color: black;
+text-align: center;
+}
+
+
+
+var tfnId;
+var ifnId;
+module.exports = {
+data: {
+timeout_content: 0,
+interval_content: 0
+},
+methods: {
+stimeout: function () {
+var self = this;
+tfnId = setTimeout(function () {
+self.timeout_content += 1
+}, 5000);
+},
+ctimeout: function () {
+clearTimeout(tfnId)
+},
+sinterval: function () {
+var self = this;
+ifnId = setInterval(function () {
+self.interval_content += 1
+}, 5000);
+},
+cinterval: function () {
+clearInterval(ifnId)

[2/2] incubator-weex git commit: Merge branch 'test-a' of https://github.com/YorkShen/incubator-weex into 0.13-dev

2017-05-02 Thread kyork
Merge branch 'test-a' of https://github.com/YorkShen/incubator-weex into 
0.13-dev


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

Branch: refs/heads/0.13-dev
Commit: 42f2a85e7e491f86289e4803462e184d7ef51d21
Parents: 50f6f8f c3d4765
Author: YorkShen 
Authored: Tue May 2 17:57:50 2017 +0800
Committer: YorkShen 
Committed: Tue May 2 17:57:50 2017 +0800

--
 .../java/com/alibaba/weex/WXPageActivity.java   |  3 +-
 test/pages/components/hyperlink.vue | 31 ++
 test/pages/components/hyperlink_target.vue  | 22 ++
 test/scripts/components/hyperlink.test.js   | 44 
 4 files changed, 99 insertions(+), 1 deletion(-)
--




[2/2] incubator-weex git commit: Merge branch 'bugfix-android-fixwxunittest' of https://github.com/wispy316/incubator-weex into 0.13-dev

2017-05-02 Thread kyork
Merge branch 'bugfix-android-fixwxunittest' of 
https://github.com/wispy316/incubator-weex into 0.13-dev


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

Branch: refs/heads/0.13-dev
Commit: b36852d18308197f68c5aec7505ab3fb1637567d
Parents: 42f2a85 c935fea
Author: YorkShen 
Authored: Wed May 3 11:57:13 2017 +0800
Committer: YorkShen 
Committed: Wed May 3 11:57:13 2017 +0800

--
 .../java/com/taobao/weex/utils/WXUtilsTest.java | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)
--




[1/2] incubator-weex git commit: [android] fix wx unit test

2017-05-02 Thread kyork
Repository: incubator-weex
Updated Branches:
  refs/heads/0.13-dev 42f2a85e7 -> b36852d18


[android] fix wx unit test


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

Branch: refs/heads/0.13-dev
Commit: c935fea6393ed38d3f4ddcdb8e0e7d46538297c5
Parents: 17961aa
Author: 行久 
Authored: Wed May 3 11:50:08 2017 +0800
Committer: 行久 
Committed: Wed May 3 11:50:08 2017 +0800

--
 .../java/com/taobao/weex/utils/WXUtilsTest.java | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/c935fea6/android/sdk/src/test/java/com/taobao/weex/utils/WXUtilsTest.java
--
diff --git a/android/sdk/src/test/java/com/taobao/weex/utils/WXUtilsTest.java 
b/android/sdk/src/test/java/com/taobao/weex/utils/WXUtilsTest.java
index 9976b69..e981c69 100644
--- a/android/sdk/src/test/java/com/taobao/weex/utils/WXUtilsTest.java
+++ b/android/sdk/src/test/java/com/taobao/weex/utils/WXUtilsTest.java
@@ -110,27 +110,27 @@ public class WXUtilsTest extends TestCase {
 
 @Test
 public void testGetFloatWX() throws Exception {
-Float test_float = WXUtils.getFloat("100wx");
+Float test_float = WXUtils.getFloatByViewport("100wx", TEST_VIEW_PORT);
 Float want = 100 * TEST_DENSITY * TEST_VIEW_PORT / TEST_SCREEN_WIDTH;
 assertEquals(test_float, want , 0.01);
 
-test_float = WXUtils.getFloat("100px");
+test_float = WXUtils.getFloatByViewport("100px", TEST_VIEW_PORT);
 want = 100F;
 assertEquals(test_float, want);
 
-test_float = WXUtils.getFloat("100.2");
+test_float = WXUtils.getFloatByViewport("100.2", TEST_VIEW_PORT);
 want = 100.2F;
 assertEquals(test_float, want);
 
-test_float = WXUtils.getFloat(100.2F);
+test_float = WXUtils.getFloatByViewport(100.2F, TEST_VIEW_PORT);
 want = 100.2F;
 assertEquals(test_float, want, 0.0001);
 
-test_float = WXUtils.getFloat(100.2D);
+test_float = WXUtils.getFloatByViewport(100.2D, TEST_VIEW_PORT);
 want = 100.2F;
 assertEquals(test_float, want, 0.0001);
 
-test_float = WXUtils.getFloat("NaN");
+test_float = WXUtils.getFloatByViewport("NaN", TEST_VIEW_PORT);
 want = Float.NaN;
 assertEquals(test_float, want);
 }
@@ -138,7 +138,7 @@ public class WXUtilsTest extends TestCase {
 @Test
 public void testGetIntWX() throws Exception {
 Integer test_int = WXUtils.getInt("100wx");
-Integer want = (int)(100 * TEST_DENSITY * TEST_VIEW_PORT / 
TEST_SCREEN_WIDTH);
+Integer want = (int)(100 * TEST_DENSITY * 750 / TEST_SCREEN_WIDTH);
 assertEquals(test_int, want);
 
 test_int = WXUtils.getInt("100px");
@@ -161,7 +161,7 @@ public class WXUtilsTest extends TestCase {
 @Test
 public void testGetDoubleWX() throws Exception {
 Double test_double = WXUtils.getDouble("100.32wx");
-Double want = (100.32D * TEST_DENSITY * TEST_VIEW_PORT / 
TEST_SCREEN_WIDTH);
+Double want = (100.32D * TEST_DENSITY * 750 / TEST_SCREEN_WIDTH);
 assertEquals(test_double, want, 0.01);
 
 test_double = WXUtils.getDouble("100px");



[2/5] incubator-weex git commit: - [android] Remove Raw from imageQuality

2017-06-28 Thread kyork
- [android] Remove Raw from imageQuality


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

Branch: refs/heads/0.15-dev
Commit: ddc9c3d18dcf4593e8e4eab76084ed9078229c0a
Parents: 2c24832
Author: YorkShen 
Authored: Tue Jun 27 15:57:20 2017 +0800
Committer: YorkShen 
Committed: Tue Jun 27 15:57:20 2017 +0800

--
 android/sdk/src/main/java/com/taobao/weex/dom/WXImageQuality.java | 2 --
 1 file changed, 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/ddc9c3d1/android/sdk/src/main/java/com/taobao/weex/dom/WXImageQuality.java
--
diff --git a/android/sdk/src/main/java/com/taobao/weex/dom/WXImageQuality.java 
b/android/sdk/src/main/java/com/taobao/weex/dom/WXImageQuality.java
index 488f84a..e580605 100644
--- a/android/sdk/src/main/java/com/taobao/weex/dom/WXImageQuality.java
+++ b/android/sdk/src/main/java/com/taobao/weex/dom/WXImageQuality.java
@@ -28,7 +28,5 @@ public enum WXImageQuality {
 
   HIGH,
 
-  RAW,
-
   NONE
 }



[4/5] incubator-weex git commit: * [android] Remove raw

2017-06-28 Thread kyork
* [android] Remove raw


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

Branch: refs/heads/0.15-dev
Commit: df3f903417386cb1ec31ccaa42632e211625db26
Parents: 5b1cf38
Author: YorkShen 
Authored: Wed Jun 28 15:32:44 2017 +0800
Committer: YorkShen 
Committed: Wed Jun 28 15:32:44 2017 +0800

--
 android/sdk/src/main/java/com/taobao/weex/common/Constants.java | 1 -
 1 file changed, 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/df3f9034/android/sdk/src/main/java/com/taobao/weex/common/Constants.java
--
diff --git a/android/sdk/src/main/java/com/taobao/weex/common/Constants.java 
b/android/sdk/src/main/java/com/taobao/weex/common/Constants.java
index 3da084c..f683c99 100644
--- a/android/sdk/src/main/java/com/taobao/weex/common/Constants.java
+++ b/android/sdk/src/main/java/com/taobao/weex/common/Constants.java
@@ -199,7 +199,6 @@ public class Constants {
 String LOW = "low";
 String NORMAL = "normal";
 String HIGH = "high";
-String RAW = "raw";
 String VISIBLE = "visible";
 String HIDDEN = "hidden";
 String TEXT = "text";



[5/5] incubator-weex git commit: Merge branch 'android-imageQuality' of https://github.com/YorkShen/incubator-weex into 0.15-dev

2017-06-28 Thread kyork
Merge branch 'android-imageQuality' of 
https://github.com/YorkShen/incubator-weex into 0.15-dev


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

Branch: refs/heads/0.15-dev
Commit: e4ba34646eba77aad46d3d6e0fffb0602ea01d41
Parents: 571b735 df3f903
Author: YorkShen 
Authored: Wed Jun 28 16:47:34 2017 +0800
Committer: YorkShen 
Committed: Wed Jun 28 16:47:34 2017 +0800

--
 .../com/taobao/weex/common/WXImageStrategy.java |  9 -
 .../main/java/com/taobao/weex/dom/WXAttr.java   | 38 
 .../com/taobao/weex/dom/WXImageQuality.java |  4 ++-
 3 files changed, 25 insertions(+), 26 deletions(-)
--




[1/5] incubator-weex git commit: * [android] Add RAW and None for imageQuality

2017-06-28 Thread kyork
Repository: incubator-weex
Updated Branches:
  refs/heads/0.15-dev 571b735ac -> e4ba34646


* [android] Add RAW and None for imageQuality


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

Branch: refs/heads/0.15-dev
Commit: 2c248325d808cf3780c96a2d1dafbe2cd4a86038
Parents: b549a22
Author: YorkShen 
Authored: Wed Jun 14 17:39:42 2017 +0800
Committer: YorkShen 
Committed: Mon Jun 26 17:14:46 2017 +0800

--
 .../java/com/taobao/weex/common/Constants.java  |  1 +
 .../com/taobao/weex/common/WXImageStrategy.java |  9 -
 .../main/java/com/taobao/weex/dom/WXAttr.java   | 38 
 .../com/taobao/weex/dom/WXImageQuality.java |  6 +++-
 4 files changed, 28 insertions(+), 26 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/2c248325/android/sdk/src/main/java/com/taobao/weex/common/Constants.java
--
diff --git a/android/sdk/src/main/java/com/taobao/weex/common/Constants.java 
b/android/sdk/src/main/java/com/taobao/weex/common/Constants.java
index f683c99..3da084c 100644
--- a/android/sdk/src/main/java/com/taobao/weex/common/Constants.java
+++ b/android/sdk/src/main/java/com/taobao/weex/common/Constants.java
@@ -199,6 +199,7 @@ public class Constants {
 String LOW = "low";
 String NORMAL = "normal";
 String HIGH = "high";
+String RAW = "raw";
 String VISIBLE = "visible";
 String HIDDEN = "hidden";
 String TEXT = "text";

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/2c248325/android/sdk/src/main/java/com/taobao/weex/common/WXImageStrategy.java
--
diff --git 
a/android/sdk/src/main/java/com/taobao/weex/common/WXImageStrategy.java 
b/android/sdk/src/main/java/com/taobao/weex/common/WXImageStrategy.java
index 74d06b0..994c99b 100644
--- a/android/sdk/src/main/java/com/taobao/weex/common/WXImageStrategy.java
+++ b/android/sdk/src/main/java/com/taobao/weex/common/WXImageStrategy.java
@@ -24,9 +24,16 @@ import java.util.Map;
 
 public class WXImageStrategy {
 
+
   /**
-   * Whether to clip image. The default value is false.
+   * Never!
+   * Never!
+   * Never!
+   * Never use this flag, ImageView has done all the job of clipping!
+   * There is no method to read this flag any more.
+   * This field will be removed when it's appropriate.
*/
+  @Deprecated
   public boolean isClipping;
 
   /**

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/2c248325/android/sdk/src/main/java/com/taobao/weex/dom/WXAttr.java
--
diff --git a/android/sdk/src/main/java/com/taobao/weex/dom/WXAttr.java 
b/android/sdk/src/main/java/com/taobao/weex/dom/WXAttr.java
index 05e1626..d143dac 100644
--- a/android/sdk/src/main/java/com/taobao/weex/dom/WXAttr.java
+++ b/android/sdk/src/main/java/com/taobao/weex/dom/WXAttr.java
@@ -18,23 +18,23 @@
  */
 package com.taobao.weex.dom;
 
+import static java.lang.Boolean.parseBoolean;
+
 import android.support.annotation.NonNull;
 import android.support.v4.util.ArrayMap;
 import android.text.TextUtils;
-
 import com.taobao.weex.common.Constants;
+import com.taobao.weex.common.Constants.Name;
 import com.taobao.weex.common.WXImageSharpen;
 import com.taobao.weex.ui.view.listview.WXRecyclerView;
 import com.taobao.weex.utils.WXLogUtils;
 import com.taobao.weex.utils.WXUtils;
 import com.taobao.weex.utils.WXViewUtils;
-
 import java.util.Collection;
+import java.util.Locale;
 import java.util.Map;
 import java.util.Set;
 
-import static java.lang.Boolean.parseBoolean;
-
 /**
  * store value of component attribute
  *
@@ -95,27 +95,17 @@ public class WXAttr implements Map,Cloneable {
   }
 
   public WXImageQuality getImageQuality() {
-
-Object obj = get(Constants.Name.QUALITY);
-if (obj == null) {
-  obj = get(Constants.Name.IMAGE_QUALITY);
-}
-if (obj == null) {
-  return WXImageQuality.LOW;
-}
-WXImageQuality waImageQuality = WXImageQuality.LOW;
-String imageQuality = obj.toString();
-if (imageQuality.equals(Constants.Value.ORIGINAL)) {
-  waImageQuality = WXImageQuality.ORIGINAL;
-} else if (imageQuality.equals(Constants.Value.LOW)) {
-  waImageQuality = WXImageQuality.LOW;
-} else if (imageQuality.equals(Constants.Value.NORMAL)) {
-  waImageQuality = WXImageQuality.NORMAL;
-} else if (imageQuality.equals(Constants.Value.HIGH)) {
-  waImageQuality = WXImageQuality.HIGH;
+Object obj = 

[3/5] incubator-weex git commit: * [android] Change the default value of img quality.

2017-06-28 Thread kyork
* [android] Change the default value of img quality.


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

Branch: refs/heads/0.15-dev
Commit: 5b1cf3854b3bc4bea9ec7b4a3beca634073e38df
Parents: ddc9c3d
Author: YorkShen 
Authored: Wed Jun 28 15:26:48 2017 +0800
Committer: YorkShen 
Committed: Wed Jun 28 15:26:48 2017 +0800

--
 android/sdk/src/main/java/com/taobao/weex/dom/WXAttr.java | 2 +-
 android/sdk/src/main/java/com/taobao/weex/dom/WXImageQuality.java | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5b1cf385/android/sdk/src/main/java/com/taobao/weex/dom/WXAttr.java
--
diff --git a/android/sdk/src/main/java/com/taobao/weex/dom/WXAttr.java 
b/android/sdk/src/main/java/com/taobao/weex/dom/WXAttr.java
index d143dac..31ac09b 100644
--- a/android/sdk/src/main/java/com/taobao/weex/dom/WXAttr.java
+++ b/android/sdk/src/main/java/com/taobao/weex/dom/WXAttr.java
@@ -96,7 +96,7 @@ public class WXAttr implements Map,Cloneable {
 
   public WXImageQuality getImageQuality() {
 Object obj = containsKey(Name.QUALITY) ? get(Name.QUALITY) : 
get(Name.IMAGE_QUALITY);
-WXImageQuality imageQuality = WXImageQuality.NONE;
+WXImageQuality imageQuality = WXImageQuality.AUTO;
 String value;
 if (obj != null && !TextUtils.isEmpty(value = obj.toString())) {
   try {

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5b1cf385/android/sdk/src/main/java/com/taobao/weex/dom/WXImageQuality.java
--
diff --git a/android/sdk/src/main/java/com/taobao/weex/dom/WXImageQuality.java 
b/android/sdk/src/main/java/com/taobao/weex/dom/WXImageQuality.java
index e580605..6cce8f4 100644
--- a/android/sdk/src/main/java/com/taobao/weex/dom/WXImageQuality.java
+++ b/android/sdk/src/main/java/com/taobao/weex/dom/WXImageQuality.java
@@ -28,5 +28,5 @@ public enum WXImageQuality {
 
   HIGH,
 
-  NONE
+  AUTO
 }



[1/2] incubator-weex git commit: * [android] gradle update to version 3.3 and fix javadoc issues

2017-09-15 Thread kyork
Repository: incubator-weex
Updated Branches:
  refs/heads/0.16-dev 55d7c3573 -> e52d273e2


* [android] gradle update to version 3.3 and fix javadoc issues


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

Branch: refs/heads/0.16-dev
Commit: ecc2166e45a235f3c78eba552c9a3f0651c106fc
Parents: 55d7c35
Author: atomtong 
Authored: Fri Sep 15 12:07:27 2017 +0800
Committer: atomtong 
Committed: Fri Sep 15 12:07:27 2017 +0800

--
 android/build.gradle   | 13 -
 android/gradle/wrapper/gradle-wrapper.properties   |  2 +-
 .../src/main/java/com/taobao/weex/WXSDKInstance.java   |  2 +-
 3 files changed, 10 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/ecc2166e/android/build.gradle
--
diff --git a/android/build.gradle b/android/build.gradle
index 28cf76e..9c0e2d5 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -5,12 +5,13 @@ buildscript {
 jcenter()
 }
 dependencies {
-classpath 'com.android.tools.build:gradle:2.1.3'
+classpath 'com.android.tools.build:gradle:2.3.3'
 }
 }
 
 plugins {
 id "de.undercouch.download" version "3.2.0"
+//id "com.github.dcendents.android-maven" version "1.5"
 }
 
 repositories {
@@ -29,7 +30,9 @@ subprojects {
 jcenter()
 }
 dependencies {
-classpath 'com.android.tools.build:gradle:2.1.3'
+classpath 'com.android.tools.build:gradle:2.3.3'
+classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.0'
+classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
 }
 }
 ext {
@@ -43,6 +46,6 @@ subprojects {
 }
 }
 
-task clean(type: Delete) {
-delete rootProject.buildDir
-}
+//task clean(type: Delete) {
+//delete rootProject.buildDir
+//}

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/ecc2166e/android/gradle/wrapper/gradle-wrapper.properties
--
diff --git a/android/gradle/wrapper/gradle-wrapper.properties 
b/android/gradle/wrapper/gradle-wrapper.properties
index d795868..73990aa 100644
--- a/android/gradle/wrapper/gradle-wrapper.properties
+++ b/android/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/ecc2166e/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
--
diff --git a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java 
b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
index 537f43a..fcdcd0d 100644
--- a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
+++ b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
@@ -1500,7 +1500,7 @@ public class WXSDKInstance implements 
IWXActivityStateListener,DomContext, View.
* Check whether the current module registered the event
* @param eventName EventName register in weex
* @param module Events occur in this Module
-   * @return  register->true
+   * @return  boolean true
*/
   public boolean checkModuleEventRegistered(String eventName,WXModule module) {
 if (module != null) {



[2/2] incubator-weex git commit: * [android] update ci -- gradle wrapper --gradle-version 3.3

2017-09-15 Thread kyork
* [android] update ci -- gradle wrapper --gradle-version 3.3


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

Branch: refs/heads/0.16-dev
Commit: e52d273e27e87da3773e65f3aaeae33ecf6b4f02
Parents: ecc2166
Author: atomtong 
Authored: Fri Sep 15 14:41:47 2017 +0800
Committer: atomtong 
Committed: Fri Sep 15 14:41:47 2017 +0800

--
 scripts/build_from_source.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/e52d273e/scripts/build_from_source.sh
--
diff --git a/scripts/build_from_source.sh b/scripts/build_from_source.sh
index 1b114e7..132efb0 100644
--- a/scripts/build_from_source.sh
+++ b/scripts/build_from_source.sh
@@ -34,7 +34,7 @@ sleep 2
 cp packages/weex-js-framework/index.min.js ios_sdk/WeexSDK/Resources/main.js
 cp packages/weex-js-framework/index.min.js android_sdk/assets/main.js
 
-gradle wrapper --gradle-version 2.14.1
+gradle wrapper --gradle-version 3.3
 echo 'include ":android_sdk"'>settings.gradle
 ./gradlew :android_sdk:assemble -PasfRelease
 



[2/3] incubator-weex git commit: do not let same crash page reload again on short time

2017-09-14 Thread kyork
 do not let same crash page reload again on short time


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

Branch: refs/heads/0.16-dev
Commit: de67bd868673e52342a33605006a6a131d516edd
Parents: 595ded4
Author: 御魂 
Authored: Thu Sep 14 00:53:01 2017 +0800
Committer: yuhun-alibaba 
Committed: Thu Sep 14 12:19:03 2017 +0800

--
 .../java/com/taobao/weex/WXSDKInstance.java | 26 ++-
 .../com/taobao/weex/bridge/WXBridgeManager.java | 27 +---
 .../com/taobao/weex/dom/action/Actions.java |  4 +--
 .../weex/dom/action/ReloadPageAction.java   |  6 +++--
 4 files changed, 43 insertions(+), 20 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/de67bd86/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
--
diff --git a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java 
b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
index d1bbd52..f354a25 100644
--- a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
+++ b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
@@ -606,21 +606,23 @@ public class WXSDKInstance implements 
IWXActivityStateListener,DomContext, View.
 return "";
   }
 
-  public void reloadPage() {
+  public void reloadPage(boolean reloadThis) {
+
 WXSDKEngine.reload();
 
-// 可以发送广播吗?
-if (mContext != null) {
-  Intent intent = new Intent();
-  intent.setAction(IWXDebugProxy.ACTION_INSTANCE_RELOAD);
-  intent.putExtra("url", mBundleUrl);
-  mContext.sendBroadcast(intent);
+if (reloadThis) {
+  // 可以发送广播吗?
+  if (mContext != null)  {
+Intent intent = new Intent();
+intent.setAction(IWXDebugProxy.ACTION_INSTANCE_RELOAD);
+intent.putExtra("url", mBundleUrl);
+mContext.sendBroadcast(intent);
+  }
+  // mRendered = false;
+  //destroy();
+  // renderInternal(mPackage, mTemplate, mOptions, mJsonInitData, mFlag);
+  // refreshInstance("{}");
 }
-// mRendered = false;
-//destroy();
-// renderInternal(mPackage, mTemplate, mOptions, mJsonInitData, mFlag);
-// refreshInstance("{}");
-
   }
   /**
* Refresh instance asynchronously.

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/de67bd86/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java
--
diff --git 
a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java 
b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java
index 89b2d3b..3b11387 100644
--- a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java
+++ b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java
@@ -135,6 +135,9 @@ public class WXBridgeManager implements 
Callback,BactchExecutor {
   private static final int CRASHREINIT = 50;
   private static int reInitCount = 1;
 
+  private static String crashUrl = null;
+  private static long lastCrashTime = 0;
+
 
   /**
* next tick tasks, can set priority
@@ -962,12 +965,15 @@ public class WXBridgeManager implements 
Callback,BactchExecutor {
 WXLogUtils.e("[WXBridgeManager] callReportCrashReloadPage exception: 
", e);
   }
   try {
+
   if (WXSDKManager.getInstance().getSDKInstance(instanceId) != null) {
-  // JSONObject domObject = JSON.parseObject(tasks);
+  boolean reloadThisInstance = shouReloadCurrentInstance(
+  
WXSDKManager.getInstance().getSDKInstance(instanceId).getBundleUrl());
   WXDomModule domModule = getDomModule(instanceId);
-  Action action = Actions.getReloadPage(instanceId);
-  domModule.postAction((DOMAction)action, true);
+  Action action = Actions.getReloadPage(instanceId, 
reloadThisInstance);
+  domModule.postAction((DOMAction) action, true);
   }
+
   } catch (Exception e) {
   WXLogUtils.e("[WXBridgeManager] callReloadPage exception: ", e);
   commitJSBridgeAlarmMonitor(instanceId, 
WXErrorCode.WX_ERR_RELOAD_PAGE,"[WXBridgeManager] callReloadPage exception 
"+e.getCause());
@@ -975,6 +981,19 @@ public class WXBridgeManager implements 
Callback,BactchExecutor {
   return IWXBridge.INSTANCE_RENDERING_ERROR;
   }
 
+  public boolean shouReloadCurrentInstance(String aUrl) {
+long time = System.currentTimeMillis();
+if (crashUrl == null ||
+ 

[1/3] incubator-weex git commit: fix exec js exception on android7.1.1 platform

2017-09-14 Thread kyork
Repository: incubator-weex
Updated Branches:
  refs/heads/0.16-dev f95d20db1 -> 84b000d31


fix exec js exception on android7.1.1 platform


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

Branch: refs/heads/0.16-dev
Commit: 595ded47e5ffba84d0f9f3e74bd021d4859da758
Parents: 701c4b9
Author: yuhun-alibaba 
Authored: Wed Sep 13 17:13:07 2017 +0800
Committer: yuhun-alibaba 
Committed: Wed Sep 13 17:53:21 2017 +0800

--
 android/sdk/libs/armeabi/libweexjsc.so | Bin 325660 -> 325660 bytes
 android/sdk/libs/armeabi/libweexjss.so | Bin 6754012 -> 6754016 bytes
 2 files changed, 0 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/595ded47/android/sdk/libs/armeabi/libweexjsc.so
--
diff --git a/android/sdk/libs/armeabi/libweexjsc.so 
b/android/sdk/libs/armeabi/libweexjsc.so
index d3fb7e7..b08a455 100755
Binary files a/android/sdk/libs/armeabi/libweexjsc.so and 
b/android/sdk/libs/armeabi/libweexjsc.so differ

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/595ded47/android/sdk/libs/armeabi/libweexjss.so
--
diff --git a/android/sdk/libs/armeabi/libweexjss.so 
b/android/sdk/libs/armeabi/libweexjss.so
index c0236b6..13e5bc6 100755
Binary files a/android/sdk/libs/armeabi/libweexjss.so and 
b/android/sdk/libs/armeabi/libweexjss.so differ



[1/2] incubator-weex git commit: * [doc] bug fix setup about

2017-09-14 Thread kyork
Repository: incubator-weex
Updated Branches:
  refs/heads/dev d16ba8d88 -> bdd6f1b5b


* [doc] bug fix setup about


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

Branch: refs/heads/dev
Commit: 5cffb4e5c52bffc30c24a461ccf76a2546030635
Parents: b13b428
Author: gurisxie <279483...@qq.com>
Authored: Fri Sep 15 10:50:30 2017 +0800
Committer: gurisxie <279483...@qq.com>
Committed: Fri Sep 15 10:50:30 2017 +0800

--
 doc/source/cn/guide/set-up-env.md| 2 +-
 doc/source/cn/guide/tools/toolkit.md | 2 +-
 doc/source/guide/set-up-env.md   | 2 +-
 doc/source/guide/tools/toolkit.md| 5 ++---
 4 files changed, 5 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5cffb4e5/doc/source/cn/guide/set-up-env.md
--
diff --git a/doc/source/cn/guide/set-up-env.md 
b/doc/source/cn/guide/set-up-env.md
index 139e155..30b77d6 100644
--- a/doc/source/cn/guide/set-up-env.md
+++ b/doc/source/cn/guide/set-up-env.md
@@ -90,7 +90,7 @@ $ weex init awesome-project
 - `serve`: 开启静态服务器
 - `debug`: 调试模式
 
-我们先通过 `npm install` 安装项目依赖。之后运行 `npm run dev` 
和 `npm run serve` 开启watch 模式和静态服务器。
+我们先通过 `npm install` 安装项目依赖。之后运行根目录下的 
`sh ./start` 开启  watch 模式和静态服务器。
 
 然后我们打开浏览器,进入 `http://localhost:8080/index.html` 
即可看到 weex h5 页面。 
 

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5cffb4e5/doc/source/cn/guide/tools/toolkit.md
--
diff --git a/doc/source/cn/guide/tools/toolkit.md 
b/doc/source/cn/guide/tools/toolkit.md
index 90bfe13..de72f75 100644
--- a/doc/source/cn/guide/tools/toolkit.md
+++ b/doc/source/cn/guide/tools/toolkit.md
@@ -53,7 +53,7 @@ $ weex init awesome-project
 - `serve`: 开启静态服务器
 - `debug`: 调试模式
 
-我们先通过 `npm install` 安装项目依赖。之后运行 `npm run dev` 
和 `npm run serve` 开启 `watch` 模式和静态服务器。
+我们先通过 `npm install` 安装项目依赖。之后运行根目录下的 
`sh ./start` 开启 watch 模式和静态服务器。
 
 然后我们打开浏览器,进入 `http://localhost:8080/index.html` 
即可看到 Weex h5 页面。
 

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5cffb4e5/doc/source/guide/set-up-env.md
--
diff --git a/doc/source/guide/set-up-env.md b/doc/source/guide/set-up-env.md
index 702c347..b734d08 100644
--- a/doc/source/guide/set-up-env.md
+++ b/doc/source/guide/set-up-env.md
@@ -57,7 +57,7 @@ We enter the awesome-project folder and install dependencies 
with the following
 npm install
 ```
 
-Then we run `npm run dev` and `npm run serve` to start watch mode and static 
server.
+Then we run `sh ./start` in root directory to start watch mode and static 
server.
 
 Finally, we can see the Weex page in `http://localhost:8080/index.html`.
 

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5cffb4e5/doc/source/guide/tools/toolkit.md
--
diff --git a/doc/source/guide/tools/toolkit.md 
b/doc/source/guide/tools/toolkit.md
index 2e19b2d..ff088cb 100644
--- a/doc/source/guide/tools/toolkit.md
+++ b/doc/source/guide/tools/toolkit.md
@@ -37,10 +37,9 @@ There are some useful npm scripts you will use in the future:
 - `serve`: start a web server
 - `debug`: open the debug mode
 
-When all dependences are ready, you can input `npm run dev` and run `npm run 
server` in a command line tab. Now you can visit our web page in :
-
-http://localhost:8080/index.html
+Then we run `sh ./start` in root directory to start watch mode and static 
server. 
 
+Finally, we can see the Weex page in `http://localhost:8080/index.html`.
 
 ### preview Weex page in time
 



[3/3] incubator-weex git commit: Merge branch '0.16-dev-debug' of https://github.com/yuhun-alibaba/incubator-weex into 0.16-dev

2017-09-14 Thread kyork
Merge branch '0.16-dev-debug' of 
https://github.com/yuhun-alibaba/incubator-weex into 0.16-dev


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

Branch: refs/heads/0.16-dev
Commit: 84b000d31750d5d86e95b0482ca717aa245e7aac
Parents: f95d20d de67bd8
Author: YorkShen 
Authored: Fri Sep 15 10:49:51 2017 +0800
Committer: YorkShen 
Committed: Fri Sep 15 10:49:51 2017 +0800

--
 .../java/com/taobao/weex/WXSDKInstance.java | 26 ++-
 .../com/taobao/weex/bridge/WXBridgeManager.java | 27 +---
 .../com/taobao/weex/dom/action/Actions.java |  4 +--
 .../weex/dom/action/ReloadPageAction.java   |  6 +++--
 4 files changed, 43 insertions(+), 20 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/84b000d3/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
--



[2/2] incubator-weex git commit: Merge commit 'd16ba8d888e07d285e3f523ed4010c934b1a4c48' into dev

2017-09-14 Thread kyork
Merge commit 'd16ba8d888e07d285e3f523ed4010c934b1a4c48' into dev

Conflicts:
doc/source/guide/set-up-env.md


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

Branch: refs/heads/dev
Commit: bdd6f1b5b6a0dc1c2fbd12335b801f687149d29c
Parents: 5cffb4e d16ba8d
Author: gurisxie <279483...@qq.com>
Authored: Fri Sep 15 10:55:24 2017 +0800
Committer: gurisxie <279483...@qq.com>
Committed: Fri Sep 15 10:55:24 2017 +0800

--
 .flowconfig |   1 +
 .gitignore  |   4 +
 .travis.yml |  91 ++-
 Dangerfile-ios  |   1 +
 HOW-TO-BUILD.md |  80 +++
 LICENSE |  22 +-
 POSSIBLE-NOTICES-FOR-BIN-DIST   |   3 +
 README.md   |  53 +-
 README_RELEASE.md   |  69 --
 RUN-RAT.md  |  12 +
 WeexSDK.podspec |   6 +-
 android/build.gradle|   7 +-
 android/commons/build.gradle|   1 +
 .../adapter/DefaultWebSocketAdapter.java|  54 +-
 .../weex/commons/util/RequestIdGenerator.java   |  15 +
 .../weex/commons/util/WSEventReporter.java  | 192 ++
 .../gradle/wrapper/gradle-wrapper.properties|   4 +-
 android/playground/app/build.gradle |   4 +-
 .../java/com/alibaba/weex/WXApplication.java|   4 +
 .../java/com/alibaba/weex/WXPageActivity.java   |   3 +-
 .../extend/adapter/InterceptWXHttpAdapter.java  |  57 +-
 .../weex/extend/component/WXParallax.java   | 345 ++
 .../weex/extend/module/WXEventModule.java   |  23 +-
 android/run-ci.sh   |   4 -
 android/sdk/assets/main.js  |   8 -
 android/sdk/build.gradle|  27 +-
 android/sdk/libs/armeabi/libweexjsc.so  | Bin 7558100 -> 7570504 bytes
 android/sdk/libs/x86/libweexjsc.so  | Bin 4545544 -> 12121924 bytes
 .../java/com/taobao/weex/ComponentObserver.java |  50 ++
 .../com/taobao/weex/LayoutFinishListener.java   |  26 +
 .../java/com/taobao/weex/WXEnvironment.java |   5 +
 .../main/java/com/taobao/weex/WXSDKEngine.java  |   6 +
 .../java/com/taobao/weex/WXSDKInstance.java | 102 ++-
 .../main/java/com/taobao/weex/WXSDKManager.java |  15 +-
 .../taobao/weex/adapter/ICrashInfoReporter.java |  27 +
 .../taobao/weex/adapter/IDrawableLoader.java|   3 +-
 .../weex/adapter/IWXUserTrackAdapter.java   |   2 +-
 .../java/com/taobao/weex/bridge/WXBridge.java   | 299 +++-
 .../com/taobao/weex/bridge/WXBridgeManager.java | 425 +++-
 .../com/taobao/weex/bridge/WXModuleManager.java |  44 +-
 .../java/com/taobao/weex/common/Constants.java  |   2 +
 .../weex/common/ICheckBindingScroller.java  |  27 +
 .../java/com/taobao/weex/common/IWXBridge.java  |  21 +
 .../java/com/taobao/weex/common/WXConfig.java   |   1 +
 .../com/taobao/weex/common/WXImageStrategy.java |   9 +-
 .../com/taobao/weex/common/WXPerformance.java   |   9 +-
 .../taobao/weex/dom/DOMActionContextImpl.java   |  15 +-
 .../com/taobao/weex/dom/TextDecorationSpan.java |  55 ++
 .../main/java/com/taobao/weex/dom/WXAttr.java   |  38 +-
 .../java/com/taobao/weex/dom/WXDomHandler.java  |   4 +
 .../java/com/taobao/weex/dom/WXDomManager.java  |  19 +
 .../java/com/taobao/weex/dom/WXDomModule.java   |   2 +-
 .../com/taobao/weex/dom/WXImageQuality.java |   4 +-
 .../taobao/weex/dom/WXRecyclerDomObject.java|   4 +
 .../main/java/com/taobao/weex/dom/WXStyle.java  |  32 +-
 .../com/taobao/weex/dom/WXSwitchDomObject.java  |  29 +-
 .../com/taobao/weex/dom/WXTextDomObject.java|  15 +-
 .../com/taobao/weex/dom/action/Actions.java |  74 +-
 .../taobao/weex/dom/action/AnimationAction.java |  40 +-
 .../weex/dom/action/CreateFinishAction.java |  20 +
 .../weex/dom/action/ExecutableRenderAction.java |  48 ++
 .../weex/dom/action/ModuleInvocationAction.java |  68 ++
 .../weex/dom/action/UpdateStyleAction.java  |   4 +-
 .../taobao/weex/ui/IExternalModuleGetter.java   |  30 +
 .../taobao/weex/ui/IExternalMoudleGetter.java   |  29 -
 .../ui/animation/DimensionUpdateListener.java   |  74 --
 .../weex/ui/animation/HeightProperty.java   |  35 +
 .../weex/ui/animation/LayoutParamsProperty.java |  64 ++
 .../weex/ui/animation/WXAnimationBean.java  |  73 +-
 .../taobao/weex/ui/animation/WidthProperty.java |  35 +
 .../ui/component/AbstractEditComponent.java |  47 +-
 .../com/taobao/weex/ui/component/Textarea.java  |   6 +
 

incubator-weex git commit: * [doc] Update doc format.

2017-09-15 Thread kyork
Repository: incubator-weex
Updated Branches:
  refs/heads/dev bdd6f1b5b -> 81aa503ee


* [doc] Update doc format.


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

Branch: refs/heads/dev
Commit: 81aa503ee9008d7f093ae270594579dd7bcd6f20
Parents: bdd6f1b
Author: YorkShen 
Authored: Fri Sep 15 16:27:36 2017 +0800
Committer: YorkShen 
Committed: Fri Sep 15 16:27:36 2017 +0800

--
 doc/source/references/common-style.md | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/81aa503e/doc/source/references/common-style.md
--
diff --git a/doc/source/references/common-style.md 
b/doc/source/references/common-style.md
index 9c1251f..359b0e0 100644
--- a/doc/source/references/common-style.md
+++ b/doc/source/references/common-style.md
@@ -203,9 +203,9 @@ Currently supported format:
 * scaleX(  )
 * scaleY(  )
 * rotate(  )
-- rotateX(  ) v0.14+
-- rotateY(  ) v0.14+
-- perspective(  ), supported for Android 4.1 and above. v0.16+
+* rotateX(  ) v0.14+
+* rotateY(  ) v0.14+
+* perspective(  ), supported for Android 4.1 and above. v0.16+
 * transform-origin: number/percentage/keyword(top/left/right/bottom)
 
 ### Example



incubator-weex git commit: * [doc] bugfix week init project run command

2017-09-18 Thread kyork
Repository: incubator-weex
Updated Branches:
  refs/heads/dev 81aa503ee -> 5148596d0


* [doc] bugfix week init project run command


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

Branch: refs/heads/dev
Commit: 5148596d0ff05b7fd36d4616853c4a66be1e30c7
Parents: 81aa503
Author: gurisxie <279483...@qq.com>
Authored: Mon Sep 18 19:24:59 2017 +0800
Committer: gurisxie <279483...@qq.com>
Committed: Mon Sep 18 19:24:59 2017 +0800

--
 doc/source/cn/guide/set-up-env.md| 2 +-
 doc/source/cn/guide/tools/toolkit.md | 2 +-
 doc/source/guide/set-up-env.md   | 2 +-
 doc/source/guide/tools/toolkit.md| 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5148596d/doc/source/cn/guide/set-up-env.md
--
diff --git a/doc/source/cn/guide/set-up-env.md 
b/doc/source/cn/guide/set-up-env.md
index 30b77d6..a01c4ae 100644
--- a/doc/source/cn/guide/set-up-env.md
+++ b/doc/source/cn/guide/set-up-env.md
@@ -90,7 +90,7 @@ $ weex init awesome-project
 - `serve`: 开启静态服务器
 - `debug`: 调试模式
 
-我们先通过 `npm install` 安装项目依赖。之后运行根目录下的 
`sh ./start` 开启  watch 模式和静态服务器。
+我们先通过 `npm install` 安装项目依赖。之后运行根目录下的 
`npm run dev & npm run serve` 开启  watch 模式和静态服务器。
 
 然后我们打开浏览器,进入 `http://localhost:8080/index.html` 
即可看到 weex h5 页面。 
 

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5148596d/doc/source/cn/guide/tools/toolkit.md
--
diff --git a/doc/source/cn/guide/tools/toolkit.md 
b/doc/source/cn/guide/tools/toolkit.md
index de72f75..d721118 100644
--- a/doc/source/cn/guide/tools/toolkit.md
+++ b/doc/source/cn/guide/tools/toolkit.md
@@ -53,7 +53,7 @@ $ weex init awesome-project
 - `serve`: 开启静态服务器
 - `debug`: 调试模式
 
-我们先通过 `npm install` 安装项目依赖。之后运行根目录下的 
`sh ./start` 开启 watch 模式和静态服务器。
+我们先通过 `npm install` 安装项目依赖。之后运行根目录下的 
`npm run dev & npm run serve` 开启 watch 模式和静态服务器。
 
 然后我们打开浏览器,进入 `http://localhost:8080/index.html` 
即可看到 Weex h5 页面。
 

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5148596d/doc/source/guide/set-up-env.md
--
diff --git a/doc/source/guide/set-up-env.md b/doc/source/guide/set-up-env.md
index 9580afc..1dee4f6 100644
--- a/doc/source/guide/set-up-env.md
+++ b/doc/source/guide/set-up-env.md
@@ -57,7 +57,7 @@ We enter the awesome-project folder and install dependencies 
with the following
 npm install
 ```
 
-Then we run `sh ./start` in root directory to start watch mode and static 
server.
+Then we run `npm run dev & npm run serve` in root directory to start watch 
mode and static server.
 
 Finally, we can see the Weex page in `http://localhost:8080/index.html`.
 

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5148596d/doc/source/guide/tools/toolkit.md
--
diff --git a/doc/source/guide/tools/toolkit.md 
b/doc/source/guide/tools/toolkit.md
index ff088cb..a325923 100644
--- a/doc/source/guide/tools/toolkit.md
+++ b/doc/source/guide/tools/toolkit.md
@@ -37,7 +37,7 @@ There are some useful npm scripts you will use in the future:
 - `serve`: start a web server
 - `debug`: open the debug mode
 
-Then we run `sh ./start` in root directory to start watch mode and static 
server. 
+Then we run `npm run dev & npm run serve` in root directory to start watch 
mode and static server. 
 
 Finally, we can see the Weex page in `http://localhost:8080/index.html`.
 



[2/2] incubator-weex git commit: Merge branch 'android_bugfix_textoverflow_clip' of https://github.com/YorkShen/incubator-weex into 0.16-dev

2017-09-20 Thread kyork
Merge branch 'android_bugfix_textoverflow_clip' of 
https://github.com/YorkShen/incubator-weex into 0.16-dev


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

Branch: refs/heads/0.16-dev
Commit: 0df7f61b0f72626b07c8bc7a2bcda89843338f49
Parents: caf530c 7a1769f
Author: YorkShen 
Authored: Thu Sep 21 11:36:45 2017 +0800
Committer: YorkShen 
Committed: Thu Sep 21 11:36:45 2017 +0800

--
 .../main/java/com/taobao/weex/dom/WXTextDomObject.java   | 11 +--
 1 file changed, 9 insertions(+), 2 deletions(-)
--




[1/2] incubator-weex git commit: + [android] Add a new log level.

2017-09-20 Thread kyork
Repository: incubator-weex
Updated Branches:
  refs/heads/0.16-dev 0df7f61b0 -> 920d813ab


+ [android] Add a new log level.


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

Branch: refs/heads/0.16-dev
Commit: 71365a24a5eda7bb6ae7ae0d074b3c9acb7b0947
Parents: c003509
Author: YorkShen 
Authored: Thu Sep 14 16:58:08 2017 +0800
Committer: YorkShen 
Committed: Thu Sep 14 16:58:08 2017 +0800

--
 .../src/main/java/com/taobao/weex/utils/LogLevel.java |  4 ++--
 .../main/java/com/taobao/weex/utils/WXLogUtils.java   | 14 ++
 2 files changed, 16 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/71365a24/android/sdk/src/main/java/com/taobao/weex/utils/LogLevel.java
--
diff --git a/android/sdk/src/main/java/com/taobao/weex/utils/LogLevel.java 
b/android/sdk/src/main/java/com/taobao/weex/utils/LogLevel.java
index 95dfd8a..0e10fa1 100644
--- a/android/sdk/src/main/java/com/taobao/weex/utils/LogLevel.java
+++ b/android/sdk/src/main/java/com/taobao/weex/utils/LogLevel.java
@@ -24,8 +24,8 @@ import android.util.Log;
  * Created by lixinke on 16/5/11.
  */
 public enum LogLevel {
-  ERROR("error", 0, Log.ERROR), WARN("warn", 1,Log.WARN), INFO("info", 
2,Log.INFO),
-  DEBUG("debug", 3,Log.DEBUG), VERBOSE("verbose", 4, Log.VERBOSE), 
ALL("debug", 5,Log.DEBUG),OFF("off",6,Log.DEBUG);
+  WTF("wtf", 0, Log.ASSERT), ERROR("error", 1, Log.ERROR), WARN("warn", 
2,Log.WARN), INFO("info", 3,Log.INFO),
+  DEBUG("debug", 4,Log.DEBUG), VERBOSE("verbose", 5, Log.VERBOSE), 
ALL("debug", 6,Log.DEBUG),OFF("off",7,Log.DEBUG),;
   String name;
   int value;
   int priority;

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/71365a24/android/sdk/src/main/java/com/taobao/weex/utils/WXLogUtils.java
--
diff --git a/android/sdk/src/main/java/com/taobao/weex/utils/WXLogUtils.java 
b/android/sdk/src/main/java/com/taobao/weex/utils/WXLogUtils.java
index 43246ea..4f1b818 100644
--- a/android/sdk/src/main/java/com/taobao/weex/utils/WXLogUtils.java
+++ b/android/sdk/src/main/java/com/taobao/weex/utils/WXLogUtils.java
@@ -105,6 +105,10 @@ public class WXLogUtils {
 d(tag,new String(msg));
   }
 
+  public static void wtf(String msg){
+wtf(WEEX_TAG, msg);
+  }
+
   public static void d(String tag, String msg) {
 if (WXEnvironment.isApkDebugable() && !TextUtils.isEmpty(msg) && 
WXEnvironment.sLogLevel.compare(LogLevel.DEBUG) >= 0) {
   Log.d(tag, msg);
@@ -170,6 +174,10 @@ public class WXLogUtils {
 log(tag, msg,LogLevel.ERROR);
   }
 
+  public static void wtf(String tag, String msg){
+log(tag, msg, LogLevel.WTF);
+  }
+
   /**
* 'p' for 'Performance', use {@link #WEEX_PERF_TAG}
* @param msg
@@ -208,6 +216,12 @@ public class WXLogUtils {
 }
   }
 
+  public static void wtf(String prefix, Throwable e){
+if (WXEnvironment.isApkDebugable()) {
+  wtf(prefix + getStackTrace(e));
+}
+  }
+
   /**
* 'p' for 'Performance', use {@link #WEEX_PERF_TAG}
*/



[2/2] incubator-weex git commit: Merge branch 'android-feature-log' of https://github.com/YorkShen/incubator-weex into 0.16-dev

2017-09-20 Thread kyork
Merge branch 'android-feature-log' of 
https://github.com/YorkShen/incubator-weex into 0.16-dev


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

Branch: refs/heads/0.16-dev
Commit: 920d813ab4d375c49d445c5f7af7b8aa45ae7525
Parents: 0df7f61 71365a2
Author: YorkShen 
Authored: Thu Sep 21 11:37:20 2017 +0800
Committer: YorkShen 
Committed: Thu Sep 21 11:37:20 2017 +0800

--
 .../src/main/java/com/taobao/weex/utils/LogLevel.java |  4 ++--
 .../main/java/com/taobao/weex/utils/WXLogUtils.java   | 14 ++
 2 files changed, 16 insertions(+), 2 deletions(-)
--




[1/2] incubator-weex git commit: * [android] Fix the problem of 'text-overflow:clip' will delete the second last word.

2017-09-20 Thread kyork
Repository: incubator-weex
Updated Branches:
  refs/heads/0.16-dev caf530ca8 -> 0df7f61b0


 * [android] Fix the problem of  'text-overflow:clip' will delete the second 
last word.


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

Branch: refs/heads/0.16-dev
Commit: 7a1769fca7cb6cb57a7a0c828ebfd9ed94f17876
Parents: e52d273
Author: YorkShen 
Authored: Wed Sep 20 16:24:18 2017 +0800
Committer: YorkShen 
Committed: Wed Sep 20 16:24:18 2017 +0800

--
 .../main/java/com/taobao/weex/dom/WXTextDomObject.java   | 11 +--
 1 file changed, 9 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/7a1769fc/android/sdk/src/main/java/com/taobao/weex/dom/WXTextDomObject.java
--
diff --git a/android/sdk/src/main/java/com/taobao/weex/dom/WXTextDomObject.java 
b/android/sdk/src/main/java/com/taobao/weex/dom/WXTextDomObject.java
index 06084a9..8adb991 100644
--- a/android/sdk/src/main/java/com/taobao/weex/dom/WXTextDomObject.java
+++ b/android/sdk/src/main/java/com/taobao/weex/dom/WXTextDomObject.java
@@ -337,12 +337,19 @@ public class WXTextDomObject extends WXDomObject {
   int desired, @Nullable TextUtils.TruncateAt truncateAt) {
 Spanned ret = new SpannedString("");
 if (!TextUtils.isEmpty(source) && source.length() > 0) {
-  StaticLayout layout;
   if (truncateAt != null) {
 source.append(ELLIPSIS);
   }
+
+  StaticLayout layout;
+  int startOffset;
+
   while (source.length() > 1) {
-source.delete(source.length() - 2, source.length() - 1);
+startOffset = source.length() -1;
+if (truncateAt != null) {
+  startOffset -= 1;
+}
+source.delete(startOffset, startOffset+1);
 layout = new StaticLayout(source, paint, desired, 
Layout.Alignment.ALIGN_NORMAL, 1, 0, true);
 if (layout.getLineCount() <= 1) {
   ret = source;



[2/2] incubator-weex git commit: Merge branch 'android-feature-codecoverage-taobaoplugin' of https://github.com/atomtong/incubator-weex into 0.16-dev

2017-09-07 Thread kyork
Merge branch 'android-feature-codecoverage-taobaoplugin' of 
https://github.com/atomtong/incubator-weex into 0.16-dev


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

Branch: refs/heads/0.16-dev
Commit: 6e642b68cbc04714bd38e055faf0bbd0e81b412e
Parents: aeb601e 77f0141
Author: YorkShen 
Authored: Thu Sep 7 17:44:17 2017 +0800
Committer: YorkShen 
Committed: Thu Sep 7 17:44:17 2017 +0800

--
 test/run.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--




[1/2] incubator-weex git commit: * [test] add jacobo test else assemble

2017-09-07 Thread kyork
Repository: incubator-weex
Updated Branches:
  refs/heads/0.16-dev aeb601eb8 -> 6e642b68c


* [test] add jacobo test else assemble


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

Branch: refs/heads/0.16-dev
Commit: 77f014155f0d8dea6c19aa12a494d7cfc2ee6527
Parents: 56195cb
Author: atomtong 
Authored: Thu Sep 7 17:41:27 2017 +0800
Committer: atomtong 
Committed: Thu Sep 7 17:41:27 2017 +0800

--
 test/run.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/77f01415/test/run.sh
--
diff --git a/test/run.sh b/test/run.sh
index 27073e7..f1fe1d1 100755
--- a/test/run.sh
+++ b/test/run.sh
@@ -25,9 +25,9 @@ function buildAndroid {
 echo "needCoverage value:$needCoverage"
 $codeCoverageCmd
 echo $codeCoverageCmd
+else 
+./gradlew clean assembleDebug
 fi
-./gradlew clean assembleDebug
-
 cd $current_dir;
 pwd
 }



[2/4] incubator-weex git commit: * [android] rendercontainer set to null when instance invoke destroy

2017-09-13 Thread kyork
* [android] rendercontainer set to null when instance invoke destroy


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

Branch: refs/heads/0.16-dev
Commit: 3d3291ad1a0cbce649329141acfdfea94ced7963
Parents: d76c4bd
Author: atomtong 
Authored: Mon Sep 11 17:22:30 2017 +0800
Committer: atomtong 
Committed: Mon Sep 11 17:22:30 2017 +0800

--
 android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/3d3291ad/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
--
diff --git a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java 
b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
index 35c81e2..a1d8499 100644
--- a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
+++ b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
@@ -1259,7 +1259,6 @@ public class WXSDKInstance implements 
IWXActivityStateListener,DomContext, View.
 if(mRootComp != null ) {
   mRootComp.destroy();
   destroyView(mRenderContainer);
-  mRenderContainer = null;
   mRootComp = null;
 }
 
@@ -1275,7 +1274,9 @@ public class WXSDKInstance implements 
IWXActivityStateListener,DomContext, View.
  mWXScrollListeners = null;
}
 
-mNestedInstanceInterceptor = null;
+   mRenderContainer = null;
+
+   mNestedInstanceInterceptor = null;
 mUserTrackAdapter = null;
 mScrollView = null;
 mContext = null;



[4/4] incubator-weex git commit: Merge branch '0.16-dev-bugfix-WXParallax-scrollerlistener-memoryleak' of https://github.com/atomtong/incubator-weex into 0.16-dev

2017-09-13 Thread kyork
Merge branch '0.16-dev-bugfix-WXParallax-scrollerlistener-memoryleak' of 
https://github.com/atomtong/incubator-weex into 0.16-dev


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

Branch: refs/heads/0.16-dev
Commit: 701c4b97213a02aedc5160105cda89a6ee31727c
Parents: d82509d f144082
Author: YorkShen 
Authored: Wed Sep 13 16:44:47 2017 +0800
Committer: YorkShen 
Committed: Wed Sep 13 16:44:47 2017 +0800

--
 android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)
--




[3/4] incubator-weex git commit: * [android] private filed set to in destroy null opt

2017-09-13 Thread kyork
* [android] private filed set to in destroy null opt


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

Branch: refs/heads/0.16-dev
Commit: f1440821809446a15fd522f2fee91b7d631180bd
Parents: 3d3291a
Author: atomtong 
Authored: Tue Sep 12 10:35:08 2017 +0800
Committer: atomtong 
Committed: Tue Sep 12 10:35:08 2017 +0800

--
 android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java | 8 ++--
 1 file changed, 2 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/f1440821/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
--
diff --git a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java 
b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
index a1d8499..d1bbd52 100644
--- a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
+++ b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
@@ -1269,13 +1269,9 @@ public class WXSDKInstance implements 
IWXActivityStateListener,DomContext, View.
 if(mComponentObserver != null){
 mComponentObserver = null;
 }
-
-if(mWXScrollListeners != null){
- mWXScrollListeners = null;
-   }
-
+
+   mWXScrollListeners = null;
mRenderContainer = null;
-
mNestedInstanceInterceptor = null;
 mUserTrackAdapter = null;
 mScrollView = null;



[1/4] incubator-weex git commit: * [android] fix wxparallax component memoryleak cause registered scrollerlisteners

2017-09-13 Thread kyork
Repository: incubator-weex
Updated Branches:
  refs/heads/0.16-dev d82509d81 -> 701c4b972


* [android] fix wxparallax component memoryleak cause registered 
scrollerlisteners


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

Branch: refs/heads/0.16-dev
Commit: d76c4bd504ec52dec25560a7ccc66d7ad568434b
Parents: c95944b
Author: atomtong 
Authored: Mon Sep 11 16:45:36 2017 +0800
Committer: atomtong 
Committed: Mon Sep 11 16:45:36 2017 +0800

--
 android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java | 4 
 1 file changed, 4 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/d76c4bd5/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
--
diff --git a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java 
b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
index 7e0da86..35c81e2 100644
--- a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
+++ b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
@@ -1271,6 +1271,10 @@ public class WXSDKInstance implements 
IWXActivityStateListener,DomContext, View.
 mComponentObserver = null;
 }
 
+if(mWXScrollListeners != null){
+ mWXScrollListeners = null;
+   }
+
 mNestedInstanceInterceptor = null;
 mUserTrackAdapter = null;
 mScrollView = null;



incubator-weex git commit: * [doc] Update doc for animation.

2017-09-13 Thread kyork
Repository: incubator-weex
Updated Branches:
  refs/heads/dev 3ae4e89e8 -> 5b3ecd5cc


* [doc] Update doc for animation.


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

Branch: refs/heads/dev
Commit: 5b3ecd5ccf88a6247c9327ebb48220d9993ff74c
Parents: 3ae4e89
Author: YorkShen 
Authored: Wed Sep 13 15:08:04 2017 +0800
Committer: YorkShen 
Committed: Wed Sep 13 15:08:04 2017 +0800

--
 doc/source/cn/references/common-style.md  | 3 +++
 doc/source/cn/references/modules/animation.md | 2 ++
 doc/source/references/common-style.md | 3 +++
 doc/source/references/modules/animation.md| 3 ++-
 4 files changed, 10 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5b3ecd5c/doc/source/cn/references/common-style.md
--
diff --git a/doc/source/cn/references/common-style.md 
b/doc/source/cn/references/common-style.md
index 0d40e69..937e8de 100644
--- a/doc/source/cn/references/common-style.md
+++ b/doc/source/cn/references/common-style.md
@@ -314,6 +314,9 @@ transform 属性向元素应用 2D 转换。该属性å…
è®¸æˆ‘们对元素进行
 - scaleX(  )
 - scaleY(  )
 - rotate(  )
+- rotateX(  ) v0.14+
+- rotateY(  ) v0.14+
+- perspective(  ) Android 4.1及以上版本支持 v0.16+
 - transform-origin: number/percentage/keyword(top/left/right/bottom)
 
 ### 示例

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5b3ecd5c/doc/source/cn/references/modules/animation.md
--
diff --git a/doc/source/cn/references/modules/animation.md 
b/doc/source/cn/references/modules/animation.md
index f50bea3..8d188fc 100644
--- a/doc/source/cn/references/modules/animation.md
+++ b/doc/source/cn/references/modules/animation.md
@@ -47,6 +47,8 @@ version: 2.1
 | `translate`/`translateX`/`translateY` | 指定元素要移动到的位置
  | 像素值或百分比 | 无|
 | `rotate`  | 指定元素
将被旋转的角度,单位是度 | number  | 无|
 | `scale`/`scaleX`/`scaleY` | 按比例放大或缩小元素   
| number  | 无|
+| `rotate`/`rotateX` v0.14+ /`rotateY` v0.14+ | 指定元素
将被旋转的角度,单位是度 | number | 无 |
+| `perspective` v0.16+ | 观察者
距离z=0平面的距离,在Android 4.1及以上有效 | number | 正无穷
 
 * `callback {Function}`:动画执行完毕之后的回调
 * 
`needLayout(boolean)`:节点动画执行时是否产生布局动画即LayoutAnimation

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5b3ecd5c/doc/source/references/common-style.md
--
diff --git a/doc/source/references/common-style.md 
b/doc/source/references/common-style.md
index c0bd084..9c1251f 100644
--- a/doc/source/references/common-style.md
+++ b/doc/source/references/common-style.md
@@ -203,6 +203,9 @@ Currently supported format:
 * scaleX(  )
 * scaleY(  )
 * rotate(  )
+- rotateX(  ) v0.14+
+- rotateY(  ) v0.14+
+- perspective(  ), supported for Android 4.1 and above. v0.16+
 * transform-origin: number/percentage/keyword(top/left/right/bottom)
 
 ### Example

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5b3ecd5c/doc/source/references/modules/animation.md
--
diff --git a/doc/source/references/modules/animation.md 
b/doc/source/references/modules/animation.md
index 6ea5cbd..a2f5175 100644
--- a/doc/source/references/modules/animation.md
+++ b/doc/source/references/modules/animation.md
@@ -52,7 +52,8 @@ properties of `transform`:
 | name| description  | 
value type   | default value |
 | :-- | :--- | 
:--- | : |
 | translate/translateX/translateY | Specifies the location of which the 
element will be translated to. | pixel or percent | none  |
-| rotate  | Specifies the angle of which the element 
will be rotated, the unit is degree. | number   | none  |
+| rotate/rotateX v0.14+ /rotateY v0.14+ |Specifies the angle of which the element 
will be rotated, the unit is degree.|number|none|
+| perspective v0.16+ | The distance between 
the z=0 plane and the user in order to give to the 3D-positioned element some 
perspective. Supported for Android 4.1 and above. | number | positive infinity
 | 

[2/2] incubator-weex git commit: Merge branch '0.16-dev-remove-method' into 0.16-dev

2017-09-13 Thread kyork
Merge branch '0.16-dev-remove-method' into 0.16-dev


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

Branch: refs/heads/0.16-dev
Commit: 96c52aec532ee6597b1522057ba4d9dc3293c83a
Parents: 701c4b9 04180c9
Author: YorkShen 
Authored: Wed Sep 13 17:36:34 2017 +0800
Committer: YorkShen 
Committed: Wed Sep 13 17:36:34 2017 +0800

--
 .../main/java/com/taobao/weex/dom/WXStyle.java  | 17 -
 .../weex/ui/view/border/BorderCorner.java   | 37 +++-
 .../taobao/weex/ui/view/border/BorderUtil.java  | 26 --
 .../weex/ui/view/border/BottomLeftCorner.java   |  7 +---
 .../weex/ui/view/border/BottomRightCorner.java  |  7 +---
 .../weex/ui/view/border/TopLeftCorner.java  |  7 +---
 .../weex/ui/view/border/TopRightCorner.java |  7 +---
 .../com/taobao/weex/utils/FunctionParser.java   |  6 
 8 files changed, 25 insertions(+), 89 deletions(-)
--




[1/2] incubator-weex git commit: - [android] Remove useless method.

2017-09-13 Thread kyork
Repository: incubator-weex
Updated Branches:
  refs/heads/0.16-dev 701c4b972 -> 96c52aec5


- [android] Remove useless method.


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

Branch: refs/heads/0.16-dev
Commit: 04180c9e8ca01be0c35e3ab50bb3d673e8fc7fd6
Parents: d82509d
Author: YorkShen 
Authored: Mon Sep 11 11:33:16 2017 +0800
Committer: YorkShen 
Committed: Wed Sep 13 16:05:20 2017 +0800

--
 .../main/java/com/taobao/weex/dom/WXStyle.java  | 17 -
 .../weex/ui/view/border/BorderCorner.java   | 37 +++-
 .../taobao/weex/ui/view/border/BorderUtil.java  | 26 --
 .../weex/ui/view/border/BottomLeftCorner.java   |  7 +---
 .../weex/ui/view/border/BottomRightCorner.java  |  7 +---
 .../weex/ui/view/border/TopLeftCorner.java  |  7 +---
 .../weex/ui/view/border/TopRightCorner.java |  7 +---
 .../com/taobao/weex/utils/FunctionParser.java   |  6 
 8 files changed, 25 insertions(+), 89 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/04180c9e/android/sdk/src/main/java/com/taobao/weex/dom/WXStyle.java
--
diff --git a/android/sdk/src/main/java/com/taobao/weex/dom/WXStyle.java 
b/android/sdk/src/main/java/com/taobao/weex/dom/WXStyle.java
index 01c25d2..6dc444a 100644
--- a/android/sdk/src/main/java/com/taobao/weex/dom/WXStyle.java
+++ b/android/sdk/src/main/java/com/taobao/weex/dom/WXStyle.java
@@ -346,23 +346,6 @@ public class WXStyle implements Map,Cloneable {
 return WXUtils.getFloatByViewport(get(Constants.Name.BORDER_WIDTH), 
viewport);
   }
 
-  public float getBorderRightWidth() {
-return getBorderWidth(Constants.Name.BORDER_RIGHT_WIDTH);
-  }
-
-  public float getBorderTopWidth() {
-return getBorderWidth(Constants.Name.BORDER_TOP_WIDTH);
-  }
-
-  public float getBorderBottomWidth() {
-return getBorderWidth(Constants.Name.BORDER_BOTTOM_WIDTH);
-  }
-
-  public float getBorderLeftWidth() {
-return getBorderWidth(Constants.Name.BORDER_LEFT_WIDTH);
-  }
-
-
   public float getBorderRightWidth(int viewport) {
 return getBorderWidth(Constants.Name.BORDER_RIGHT_WIDTH, viewport);
   }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/04180c9e/android/sdk/src/main/java/com/taobao/weex/ui/view/border/BorderCorner.java
--
diff --git 
a/android/sdk/src/main/java/com/taobao/weex/ui/view/border/BorderCorner.java 
b/android/sdk/src/main/java/com/taobao/weex/ui/view/border/BorderCorner.java
index a396063..07ff38f 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/view/border/BorderCorner.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/view/border/BorderCorner.java
@@ -31,13 +31,15 @@ abstract class BorderCorner {
   private final float mPreBorderWidth;
   private final float mPostBorderWidth;
   private final RectF mBorderBox;
+  protected final float mAngleBisector;
 
-  BorderCorner(float cornerRadius, float preBorderWidth, float 
postBorderWidth, @NonNull RectF
-  borderBox) {
+  BorderCorner(float cornerRadius, float preBorderWidth, float postBorderWidth,
+  @NonNull RectF borderBox, float angleBisector) {
 mCornerRadius = cornerRadius;
 mPreBorderWidth = preBorderWidth;
 mPostBorderWidth = postBorderWidth;
 mBorderBox = borderBox;
+mAngleBisector = angleBisector;
   }
 
   /**
@@ -61,18 +63,26 @@ abstract class BorderCorner {
 return getOuterCornerRadius() > 0 && !FloatUtil.floatsEqual(0, 
getOuterCornerRadius());
   }
 
-  protected float getPreBorderWidth() {
+  protected final float getPreBorderWidth() {
 return mPreBorderWidth;
   }
 
-  protected float getPostBorderWidth() {
+  protected final float getPostBorderWidth() {
 return mPostBorderWidth;
   }
 
-  protected float getOuterCornerRadius() {
+  protected final float getOuterCornerRadius() {
 return mCornerRadius;
   }
 
+  protected final float getAngleBisectorDegree(){
+return mAngleBisector;
+  }
+
+  protected final RectF getBorderBox() {
+return mBorderBox;
+  }
+
   /**
* Get the staring point of the corner.
* @return the starting point of the corner.
@@ -88,12 +98,6 @@ abstract class BorderCorner {
 return lineStart;
   }
 
-  @NonNull
-  abstract protected PointF getRoundCornerStart();
-
-  @NonNull
-  abstract protected PointF getSharpCornerVertex();
-
   /**
* Get the ending point of the corner.
* @return the ending point of the corner.
@@ -110,9 +114,13 @@ abstract class BorderCorner {

[2/3] incubator-weex git commit: Merge branch '0.16-github-dev' into 0.16-dev

2017-09-13 Thread kyork
Merge branch '0.16-github-dev' into 0.16-dev

* 0.16-github-dev:
  - [android] Remove useless method.


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

Branch: refs/heads/0.16-dev
Commit: 8ea57af15b869b8d899eecc856f9ea4cdf2d30b0
Parents: 3269907 96c52ae
Author: atomtong 
Authored: Wed Sep 13 17:40:53 2017 +0800
Committer: atomtong 
Committed: Wed Sep 13 17:40:53 2017 +0800

--
 .../main/java/com/taobao/weex/dom/WXStyle.java  | 17 -
 .../weex/ui/view/border/BorderCorner.java   | 37 +++-
 .../taobao/weex/ui/view/border/BorderUtil.java  | 26 --
 .../weex/ui/view/border/BottomLeftCorner.java   |  7 +---
 .../weex/ui/view/border/BottomRightCorner.java  |  7 +---
 .../weex/ui/view/border/TopLeftCorner.java  |  7 +---
 .../weex/ui/view/border/TopRightCorner.java |  7 +---
 .../com/taobao/weex/utils/FunctionParser.java   |  6 
 8 files changed, 25 insertions(+), 89 deletions(-)
--




[3/3] incubator-weex git commit: Merge branch '0.16-dev' into 0.16-dev-gitlab

2017-09-13 Thread kyork
Merge branch '0.16-dev' into 0.16-dev-gitlab


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

Branch: refs/heads/0.16-dev
Commit: ed0a8dc1a1d6ccdafaa39ea29913df516265d227
Parents: 8ea57af 20b0a43
Author: YorkShen 
Authored: Wed Sep 13 18:06:22 2017 +0800
Committer: YorkShen 
Committed: Wed Sep 13 18:06:22 2017 +0800

--
 .../alibaba/weex/benchmark/BenchmarkTest.java   |  29 ++--
 .../java/com/taobao/weex/WXSDKInstance.java |  75 ++
 .../java/com/taobao/weex/common/Constants.java  |   2 +
 .../com/taobao/weex/dom/ImmutableDomObject.java |  21 ++-
 .../taobao/weex/ui/component/WXComponent.java   | 143 +-
 .../com/taobao/weex/ui/component/WXDiv.java |  74 +-
 .../com/taobao/weex/ui/component/WXSlider.java  |   4 +-
 .../com/taobao/weex/ui/component/WXText.java|  65 +
 .../taobao/weex/ui/component/WXVContainer.java  |  44 --
 .../taobao/weex/ui/component/list/WXCell.java   |  61 +++-
 .../weex/ui/component/list/WXListComponent.java |  53 ---
 .../com/taobao/weex/ui/flat/FlatComponent.java  |  33 +
 .../com/taobao/weex/ui/flat/FlatGUIContext.java | 146 +++
 .../taobao/weex/ui/flat/WidgetContainer.java|  93 
 .../weex/ui/flat/widget/AndroidViewWidget.java  |  76 ++
 .../taobao/weex/ui/flat/widget/BaseWidget.java  | 130 +
 .../taobao/weex/ui/flat/widget/TextWidget.java  |  49 +++
 .../com/taobao/weex/ui/flat/widget/Widget.java  |  51 +++
 .../taobao/weex/ui/flat/widget/WidgetGroup.java |  54 +++
 .../com/taobao/weex/ui/view/WXFrameLayout.java  |  53 ++-
 .../java/com/taobao/weex/utils/WXViewUtils.java |  31 
 .../com/taobao/weex/ui/component/WXDivTest.java |  12 +-
 .../taobao/weex/ui/component/WXTextTest.java|  18 +--
 23 files changed, 1125 insertions(+), 192 deletions(-)
--




[05/12] incubator-weex git commit: * [android] Invalidate AndroidViewWidget and its corresponding view.

2017-09-13 Thread kyork
* [android] Invalidate AndroidViewWidget and its corresponding view.


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

Branch: refs/heads/0.16-dev
Commit: 67ea39888a9299e05c5d2a145e950830f2134f53
Parents: 60b6aad
Author: YorkShen 
Authored: Tue Sep 12 11:38:34 2017 +0800
Committer: YorkShen 
Committed: Wed Sep 13 16:54:08 2017 +0800

--
 .../taobao/weex/ui/flat/widget/AndroidViewWidget.java| 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/67ea3988/android/sdk/src/main/java/com/taobao/weex/ui/flat/widget/AndroidViewWidget.java
--
diff --git 
a/android/sdk/src/main/java/com/taobao/weex/ui/flat/widget/AndroidViewWidget.java
 
b/android/sdk/src/main/java/com/taobao/weex/ui/flat/widget/AndroidViewWidget.java
index b7968af..3edba74 100644
--- 
a/android/sdk/src/main/java/com/taobao/weex/ui/flat/widget/AndroidViewWidget.java
+++ 
b/android/sdk/src/main/java/com/taobao/weex/ui/flat/widget/AndroidViewWidget.java
@@ -35,7 +35,7 @@ public class AndroidViewWidget extends BaseWidget {
 super(context);
   }
 
-  public void setContentView(@NonNull View view){
+  public void setContentView(@Nullable View view){
 this.mView = view;
   }
 
@@ -43,6 +43,7 @@ public class AndroidViewWidget extends BaseWidget {
   public void setContentBox(int leftOffset, int topOffset, int rightOffset, 
int bottomOffset) {
 if(mView!=null) {
   mView.setPadding(leftOffset, topOffset, rightOffset, bottomOffset);
+  invalidate();
 }
   }
 
@@ -53,6 +54,14 @@ public class AndroidViewWidget extends BaseWidget {
 }
   }
 
+  @Override
+  public void invalidate() {
+super.invalidate();
+if (mView != null) {
+  mView.invalidate();
+}
+  }
+
   public @Nullable View getView() {
 return mView;
   }



[09/12] incubator-weex git commit: * [android] Add try catch for FlatGUI

2017-09-13 Thread kyork
* [android] Add try catch for FlatGUI


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

Branch: refs/heads/0.16-dev
Commit: 942d03202500019d665e29401eb91ba345e8e871
Parents: 94b4d41
Author: YorkShen 
Authored: Fri Sep 8 11:43:41 2017 +0800
Committer: YorkShen 
Committed: Wed Sep 13 16:55:22 2017 +0800

--
 .../com/taobao/weex/ui/view/WXFrameLayout.java  | 23 
 1 file changed, 14 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/942d0320/android/sdk/src/main/java/com/taobao/weex/ui/view/WXFrameLayout.java
--
diff --git 
a/android/sdk/src/main/java/com/taobao/weex/ui/view/WXFrameLayout.java 
b/android/sdk/src/main/java/com/taobao/weex/ui/view/WXFrameLayout.java
index 4156de8..28c7cef 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/view/WXFrameLayout.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/view/WXFrameLayout.java
@@ -29,6 +29,7 @@ import com.taobao.weex.ui.component.WXDiv;
 import com.taobao.weex.ui.flat.widget.Widget;
 import com.taobao.weex.ui.view.gesture.WXGesture;
 import com.taobao.weex.ui.view.gesture.WXGestureObservable;
+import com.taobao.weex.utils.WXLogUtils;
 import com.taobao.weex.utils.WXViewUtils;
 import java.lang.ref.WeakReference;
 import java.util.List;
@@ -95,16 +96,20 @@ public class WXFrameLayout extends FrameLayout implements 
WXGestureObservable,IR
 
   @Override
   protected void dispatchDraw(Canvas canvas) {
-if (mWidgets != null) {
-  canvas.save();
-  canvas.translate(getPaddingLeft(), getPaddingTop());
-  for (Widget widget : mWidgets) {
-widget.draw(canvas);
+try {
+  if (mWidgets != null) {
+canvas.save();
+canvas.translate(getPaddingLeft(), getPaddingTop());
+for (Widget widget : mWidgets) {
+  widget.draw(canvas);
+}
+canvas.restore();
+  } else {
+WXViewUtils.clipCanvasWithinBorderBox(this, canvas);
+super.dispatchDraw(canvas);
   }
-  canvas.restore();
-} else {
-  WXViewUtils.clipCanvasWithinBorderBox(this, canvas);
-  super.dispatchDraw(canvas);
+}catch (Throwable e){
+  WXLogUtils.e("FlatGUI Crashed when dispatchDraw", 
WXLogUtils.getStackTrace(e));
 }
   }
 }



[08/12] incubator-weex git commit: + [android] Add garbage collection for FlatGUI.

2017-09-13 Thread kyork
+ [android] Add garbage collection for FlatGUI.

* [android] Fix the problem of WXSDKInstance.destroy() invoked twice if WXEmbed 
present.

WXSDKInstance.destroy() will be called by
WXSDKInstance.onActivityDestroy()->WXEmbed.onActivityDestroy() 
->WXSDKInstance.onActivityDestroy() -> WXSDKInstance.destroy() and
WXSDKInstance.onActivityDestroy() -> WXSDKInstance.destroy() -> 
WXEmbed.destroy() -> WXSDKInstance.destroy().


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

Branch: refs/heads/0.16-dev
Commit: 94b4d41801b0388c58c82f2e2dd7e1b1a4fd5a6d
Parents: 67ea398
Author: YorkShen 
Authored: Fri Sep 8 11:42:33 2017 +0800
Committer: YorkShen 
Committed: Wed Sep 13 16:55:19 2017 +0800

--
 .../java/com/taobao/weex/WXSDKInstance.java | 68 +++-
 .../com/taobao/weex/ui/component/WXDiv.java |  4 +-
 .../taobao/weex/ui/component/list/WXCell.java   |  4 +-
 .../com/taobao/weex/ui/flat/FlatGUIContext.java | 24 +--
 .../weex/ui/flat/widget/AndroidViewWidget.java  | 10 ++-
 5 files changed, 71 insertions(+), 39 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/94b4d418/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
--
diff --git a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java 
b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
index 93191a8..69fc649 100644
--- a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
+++ b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
@@ -18,6 +18,8 @@
  */
 package com.taobao.weex;
 
+import static com.taobao.weex.http.WXHttpUtil.KEY_USER_AGENT;
+
 import android.app.AlertDialog;
 import android.content.Context;
 import android.content.Intent;
@@ -36,7 +38,6 @@ import android.view.Menu;
 import android.view.View;
 import android.view.ViewGroup;
 import android.widget.ScrollView;
-
 import com.alibaba.fastjson.JSONObject;
 import com.taobao.weex.adapter.IDrawableLoader;
 import com.taobao.weex.adapter.IWXHttpAdapter;
@@ -79,7 +80,6 @@ import com.taobao.weex.utils.WXJsonUtils;
 import com.taobao.weex.utils.WXLogUtils;
 import com.taobao.weex.utils.WXReflectionUtils;
 import com.taobao.weex.utils.WXViewUtils;
-
 import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -88,8 +88,6 @@ import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
 
-import static com.taobao.weex.http.WXHttpUtil.KEY_USER_AGENT;
-
 /**
  * Each instance of WXSDKInstance represents an running weex instance.
  * It can be a pure weex view, or mixed with native view
@@ -121,8 +119,8 @@ public class WXSDKInstance implements 
IWXActivityStateListener,DomContext, View.
   private boolean mNeedReLoad = false;
   private static volatile int mViewPortWidth = 750;
   private int mInstanceViewPortWidth = 750;
-  private final  @NonNull
-  FlatGUIContext mUIImp =new FlatGUIContext();
+  private @NonNull
+  FlatGUIContext mFlatGUIContext =new FlatGUIContext();
 
   public long mRenderStartNanos;
   public int mExecJSTraceId = WXTracing.nextId();
@@ -203,9 +201,10 @@ public class WXSDKInstance implements 
IWXActivityStateListener,DomContext, View.
 enableLayerType = enable;
   }
 
+  @RestrictTo(Scope.LIBRARY)
   public @NonNull
   FlatGUIContext getFlatUIContext(){
-return mUIImp;
+return mFlatGUIContext;
   }
 
   public boolean isNeedValidate() {
@@ -1258,36 +1257,41 @@ public class WXSDKInstance implements 
IWXActivityStateListener,DomContext, View.
   }
 
   public synchronized void destroy() {
-WXSDKManager.getInstance().destroyInstance(mInstanceId);
-WXComponentFactory.removeComponentTypesByInstanceId(getInstanceId());
+if(!isDestroy()) {
+  WXSDKManager.getInstance().destroyInstance(mInstanceId);
+  WXComponentFactory.removeComponentTypesByInstanceId(getInstanceId());
 
-if(mGlobalEventReceiver!=null){
-  getContext().unregisterReceiver(mGlobalEventReceiver);
-  mGlobalEventReceiver=null;
-}
-if(mRootComp != null ) {
-  mRootComp.destroy();
-  destroyView(mRenderContainer);
-  mRootComp = null;
-}
+  if (mGlobalEventReceiver != null) {
+getContext().unregisterReceiver(mGlobalEventReceiver);
+mGlobalEventReceiver = null;
+  }
+  if (mRootComp != null) {
+mRootComp.destroy();
+destroyView(mRenderContainer);
+mRootComp = null;
+  }
 
-if(mGlobalEvents!=null){
-  mGlobalEvents.clear();
-}
+  if (mGlobalEvents != null) {
+ 

[02/12] incubator-weex git commit: * [android] Init commit for flatGUI

2017-09-13 Thread kyork
* [android] Init commit for flatGUI


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

Branch: refs/heads/0.16-dev
Commit: bc6ea406e05667712f7084b268bb16f81c2298fd
Parents: 701c4b9
Author: YorkShen 
Authored: Tue Aug 22 11:37:04 2017 +0800
Committer: YorkShen 
Committed: Wed Sep 13 16:54:07 2017 +0800

--
 .../adapter/PicassoBasedDrawableLoader.java | 112 ++
 .../alibaba/weex/benchmark/BenchmarkTest.java   |  29 ++--
 .../java/com/alibaba/weex/WXApplication.java|   2 +
 .../java/com/taobao/weex/WXSDKInstance.java |  12 +-
 .../taobao/weex/adapter/DrawableStrategy.java   |   5 +
 .../java/com/taobao/weex/common/Constants.java  |   2 +
 .../com/taobao/weex/common/WXImageStrategy.java |   8 +-
 .../com/taobao/weex/dom/ImmutableDomObject.java |  21 ++-
 .../taobao/weex/ui/component/WXComponent.java   | 127 +++-
 .../com/taobao/weex/ui/component/WXDiv.java |  70 -
 .../com/taobao/weex/ui/component/WXSlider.java  |   4 +-
 .../com/taobao/weex/ui/component/WXText.java|  65 +
 .../taobao/weex/ui/component/WXVContainer.java  |  44 --
 .../taobao/weex/ui/component/list/WXCell.java   |  38 -
 .../weex/ui/component/list/WXListComponent.java |  53 ---
 .../com/taobao/weex/ui/flat/FlatComponent.java  |  33 +
 .../taobao/weex/ui/flat/FlatGUIIContext.java| 113 ++
 .../taobao/weex/ui/flat/WidgetContainer.java|  92 
 .../weex/ui/flat/widget/AndroidViewWidget.java  |  58 
 .../taobao/weex/ui/flat/widget/BaseWidget.java  | 146 +++
 .../taobao/weex/ui/flat/widget/ImageWidget.java | 102 +
 .../taobao/weex/ui/flat/widget/TextWidget.java  |  49 +++
 .../com/taobao/weex/ui/flat/widget/Widget.java  |  63 
 .../taobao/weex/ui/flat/widget/WidgetGroup.java |  50 +++
 .../com/taobao/weex/ui/view/WXFrameLayout.java  |  50 ++-
 25 files changed, 1202 insertions(+), 146 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bc6ea406/android/commons/src/main/java/com/alibaba/weex/commons/adapter/PicassoBasedDrawableLoader.java
--
diff --git 
a/android/commons/src/main/java/com/alibaba/weex/commons/adapter/PicassoBasedDrawableLoader.java
 
b/android/commons/src/main/java/com/alibaba/weex/commons/adapter/PicassoBasedDrawableLoader.java
new file mode 100644
index 000..0d03934
--- /dev/null
+++ 
b/android/commons/src/main/java/com/alibaba/weex/commons/adapter/PicassoBasedDrawableLoader.java
@@ -0,0 +1,112 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.alibaba.weex.commons.adapter;
+
+import android.content.Context;
+import android.graphics.Bitmap;
+import android.graphics.Canvas;
+import android.graphics.ColorFilter;
+import android.graphics.PixelFormat;
+import android.graphics.drawable.BitmapDrawable;
+import android.graphics.drawable.Drawable;
+import android.view.Gravity;
+
+import com.squareup.picasso.Picasso;
+import com.squareup.picasso.Target;
+import com.taobao.weex.WXSDKManager;
+import com.taobao.weex.adapter.DrawableStrategy;
+import com.taobao.weex.adapter.IDrawableLoader;
+
+
+public class PicassoBasedDrawableLoader implements IDrawableLoader {
+
+  private Context mContext;
+
+  public PicassoBasedDrawableLoader(Context context) {
+mContext = context;
+  }
+
+  @Override
+  public void setDrawable(final String url,
+  final DrawableTarget drawableTarget,
+  final DrawableStrategy drawableStrategy) {
+WXSDKManager.getInstance().postOnUiThread(new Runnable() {
+  @Override
+  public void run() {
+String temp = url;
+if (url.startsWith("//")) {
+  temp = "http:" + url;
+}
+
+/** This is a hack for picasso, as 

[11/12] incubator-weex git commit: Merge branch '0.16-dev' into android-feature-flatGUI

2017-09-13 Thread kyork
Merge branch '0.16-dev' into android-feature-flatGUI


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

Branch: refs/heads/0.16-dev
Commit: d72c4b124b136784a8fe86e6b81e05a01514c6f3
Parents: f9019f4 96c52ae
Author: YorkShen 
Authored: Wed Sep 13 17:40:15 2017 +0800
Committer: YorkShen 
Committed: Wed Sep 13 17:40:15 2017 +0800

--
 .../main/java/com/taobao/weex/dom/WXStyle.java  | 17 -
 .../weex/ui/view/border/BorderCorner.java   | 37 +++-
 .../taobao/weex/ui/view/border/BorderUtil.java  | 26 --
 .../weex/ui/view/border/BottomLeftCorner.java   |  7 +---
 .../weex/ui/view/border/BottomRightCorner.java  |  7 +---
 .../weex/ui/view/border/TopLeftCorner.java  |  7 +---
 .../weex/ui/view/border/TopRightCorner.java |  7 +---
 .../com/taobao/weex/utils/FunctionParser.java   |  6 
 8 files changed, 25 insertions(+), 89 deletions(-)
--




  1   2   3   4   5   6   7   8   9   10   >