You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by mi...@apache.org on 2018/05/03 04:09:35 UTC

incubator-weex git commit: * [android] Fix compile error.

Repository: incubator-weex
Updated Branches:
  refs/heads/master e315e8ab3 -> f677f632c


* [android] Fix compile error.


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

Branch: refs/heads/master
Commit: f677f632cadd722bb938abbba46cb058c74c8578
Parents: e315e8a
Author: miomin <69...@qq.com>
Authored: Thu May 3 12:02:00 2018 +0800
Committer: misakuo <mi...@apache.org>
Committed: Thu May 3 12:09:19 2018 +0800

----------------------------------------------------------------------
 .../java/com/taobao/weex/ui/component/WXImage.java |  2 +-
 .../com/taobao/weex/ui/component/WXVContainer.java | 17 +++++++----------
 2 files changed, 8 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/f677f632/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 6d37506..c366336 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
@@ -337,7 +337,7 @@ public class WXImage extends WXComponent<ImageView> {
     IWXImgLoaderAdapter imgLoaderAdapter = getInstance().getImgLoaderAdapter();
     if (imgLoaderAdapter != null) {
       imgLoaderAdapter.setImage(rewrited.toString(), getHostView(),
-          getDomObject().getAttrs().getImageQuality(), imageStrategy);
+          getAttrs().getImageQuality(), imageStrategy);
     }
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/f677f632/android/sdk/src/main/java/com/taobao/weex/ui/component/WXVContainer.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXVContainer.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXVContainer.java
index 86ea719..3fb3915 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXVContainer.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXVContainer.java
@@ -26,14 +26,11 @@ import android.util.Pair;
 import android.view.Menu;
 import android.view.View;
 import android.view.ViewGroup;
-import android.widget.FrameLayout;
-
 import com.taobao.weex.WXSDKInstance;
 import com.taobao.weex.annotation.JSMethod;
 import com.taobao.weex.common.Constants;
+import com.taobao.weex.dom.CSSShorthand;
 import com.taobao.weex.ui.action.BasicComponentData;
-import com.taobao.weex.dom.WXDomObject;
-import com.taobao.weex.dom.flex.Spacing;
 import com.taobao.weex.ui.view.WXImageView;
 import com.taobao.weex.utils.WXLogUtils;
 import com.taobao.weex.utils.WXUtils;
@@ -577,13 +574,13 @@ public abstract class WXVContainer<T extends ViewGroup> extends WXComponent<T> {
           mBoxShadowHost = new BoxShadowHost(getContext());
           WXViewUtils.setBackGround(mBoxShadowHost, null);
 
-          Spacing padding = this.getDomObject().getPadding();
-          Spacing border = this.getDomObject().getBorder();
+          CSSShorthand padding = this.getPadding();
+          CSSShorthand border = this.getBorder();
 
-          int left = (int) (padding.get(Spacing.LEFT) + border.get(Spacing.LEFT));
-          int top = (int) (padding.get(Spacing.TOP) + border.get(Spacing.TOP));
-          int right = (int) (padding.get(Spacing.RIGHT) + border.get(Spacing.RIGHT));
-          int bottom = (int) (padding.get(Spacing.BOTTOM) + border.get(Spacing.BOTTOM));
+          int left = (int) (padding.get(CSSShorthand.EDGE.LEFT) + border.get(CSSShorthand.EDGE.LEFT));
+          int top = (int) (padding.get(CSSShorthand.EDGE.TOP) + border.get(CSSShorthand.EDGE.TOP));
+          int right = (int) (padding.get(CSSShorthand.EDGE.RIGHT) + border.get(CSSShorthand.EDGE.RIGHT));
+          int bottom = (int) (padding.get(CSSShorthand.EDGE.BOTTOM) + border.get(CSSShorthand.EDGE.BOTTOM));
 
           ViewGroup.MarginLayoutParams layoutParams = new ViewGroup.MarginLayoutParams(hostView.getLayoutParams()) ;
           layoutParams.setMargins(-left, -top, -right, -bottom);