You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by ky...@apache.org on 2017/04/12 02:48:20 UTC

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

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 <sh...@gmail.com>
Authored: Wed Apr 12 10:48:09 2017 +0800
Committer: YorkShen <sh...@gmail.com>
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<T extends View> 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<T extends View> 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();