You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by so...@apache.org on 2017/03/02 07:09:32 UTC

[2/5] incubator-weex git commit: * [android] fix domobject NPE

* [android] fix domobject 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/24916065
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/24916065
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/24916065

Branch: refs/heads/0.11-dev
Commit: 24916065ee68bd80e1f45be6d5c3e5f30799eb18
Parents: fa1c8b0
Author: sospartan <so...@gmail.com>
Authored: Tue Feb 28 15:34:15 2017 +0800
Committer: sospartan <so...@gmail.com>
Committed: Wed Mar 1 14:05:36 2017 +0800

----------------------------------------------------------------------
 .../taobao/weex/ui/view/refresh/wrapper/BaseBounceView.java    | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/24916065/android/sdk/src/main/java/com/taobao/weex/ui/view/refresh/wrapper/BaseBounceView.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/view/refresh/wrapper/BaseBounceView.java b/android/sdk/src/main/java/com/taobao/weex/ui/view/refresh/wrapper/BaseBounceView.java
index e517ab1..1809a78 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/view/refresh/wrapper/BaseBounceView.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/view/refresh/wrapper/BaseBounceView.java
@@ -213,6 +213,7 @@ import android.view.View;
 import android.widget.FrameLayout;
 
 import com.taobao.weex.common.Constants;
+import com.taobao.weex.dom.ImmutableDomObject;
 import com.taobao.weex.ui.component.WXComponent;
 import com.taobao.weex.ui.view.WXLoadingLayout;
 import com.taobao.weex.ui.view.WXRefreshLayout;
@@ -329,8 +330,9 @@ public abstract class BaseBounceView<T extends View> extends FrameLayout {
     public void setFooterView(WXComponent loading) {
         setLoadmoreEnable(true);
         if (swipeLayout != null) {
-            if (swipeLayout.getFooterView() != null) {
-                swipeLayout.setLoadingHeight((int) loading.getDomObject().getLayoutHeight());
+            ImmutableDomObject domObject;
+            if (swipeLayout.getFooterView() != null && (domObject = loading.getDomObject()) != null) {
+                swipeLayout.setLoadingHeight((int) domObject.getLayoutHeight());
 
                 String colorStr = (String) loading.getDomObject().getStyles().get(Constants.Name.BACKGROUND_COLOR);
                 String bgColor = WXUtils.getString(colorStr, null);