You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by cx...@apache.org on 2017/03/29 12:13:39 UTC

[12/39] incubator-weex git commit: * [android] bugfix recycler getrealPxByWidth

* [android] bugfix recycler getrealPxByWidth


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

Branch: refs/heads/0.12-dev
Commit: be02dec7268d320f1f36c67a0de3b6cc4c938c5c
Parents: 9486b66
Author: zshshr <zh...@gmail.com>
Authored: Mon Mar 27 16:44:08 2017 +0800
Committer: zshshr <zh...@gmail.com>
Committed: Mon Mar 27 16:44:08 2017 +0800

----------------------------------------------------------------------
 .../src/main/java/com/taobao/weex/dom/WXRecyclerDomObject.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/be02dec7/android/sdk/src/main/java/com/taobao/weex/dom/WXRecyclerDomObject.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/dom/WXRecyclerDomObject.java b/android/sdk/src/main/java/com/taobao/weex/dom/WXRecyclerDomObject.java
index 3ee0e06..049f47f 100644
--- a/android/sdk/src/main/java/com/taobao/weex/dom/WXRecyclerDomObject.java
+++ b/android/sdk/src/main/java/com/taobao/weex/dom/WXRecyclerDomObject.java
@@ -230,7 +230,7 @@ public class WXRecyclerDomObject extends WXDomObject{
     }
 
     public float getColumnGap() {
-        return mColumnGap;
+        return WXViewUtils.getRealPxByWidth(mColumnGap,getViewPortWidth());
     }
 
     public int getColumnCount() {
@@ -238,7 +238,7 @@ public class WXRecyclerDomObject extends WXDomObject{
     }
 
     public float getColumnWidth() {
-        return mColumnWidth;
+        return WXViewUtils.getRealPxByWidth(mColumnWidth,getViewPortWidth());
     }
     @Override
     public void add(WXDomObject child, int index) {