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/06 02:54:29 UTC

[4/5] incubator-weex git commit: * [android] format code

* [android] format code


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

Branch: refs/heads/0.11-dev
Commit: 040f4b892755c59768431e927bdcb40bf241c86a
Parents: cfb1b56
Author: zshshr <zh...@gmail.com>
Authored: Fri Mar 3 18:04:31 2017 +0800
Committer: zshshr <zh...@gmail.com>
Committed: Fri Mar 3 18:04:31 2017 +0800

----------------------------------------------------------------------
 .../weex/ui/view/refresh/wrapper/BaseBounceView.java  | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/040f4b89/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 3715929..c8a47a0 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
@@ -307,14 +307,11 @@ public abstract class BaseBounceView<T extends View> extends FrameLayout {
             WXRefreshView refreshView = swipeLayout.getHeaderView();
             if (refreshView != null) {
                 ImmutableDomObject immutableDomObject = refresh.getDomObject();
-                if (immutableDomObject == null) {
+                if (immutableDomObject != null) {
                     int refreshHeight = (int) immutableDomObject.getLayoutHeight();
-
                     swipeLayout.setRefreshHeight(refreshHeight);
-
                     String colorStr = (String) immutableDomObject.getStyles().get(Constants.Name.BACKGROUND_COLOR);
                     String bgColor = WXUtils.getString(colorStr, null);
-
                     if (bgColor != null) {
                         if (!TextUtils.isEmpty(bgColor)) {
                             int colorInt = WXResourceUtils.getColor(bgColor);
@@ -338,13 +335,12 @@ public abstract class BaseBounceView<T extends View> extends FrameLayout {
         if (swipeLayout != null) {
             WXRefreshView refreshView = swipeLayout.getFooterView();
             if (refreshView != null) {
-                ImmutableDomObject object = loading.getDomObject();
-                if (object != null) {
-                    int loadingHeight = (int) loading.getDomObject().getLayoutHeight();
+                ImmutableDomObject immutableDomObject = loading.getDomObject();
+                if (immutableDomObject != null) {
+                    int loadingHeight = (int) immutableDomObject.getLayoutHeight();
                     swipeLayout.setLoadingHeight(loadingHeight);
-                    String colorStr = (String) loading.getDomObject().getStyles().get(Constants.Name.BACKGROUND_COLOR);
+                    String colorStr = (String) immutableDomObject.getStyles().get(Constants.Name.BACKGROUND_COLOR);
                     String bgColor = WXUtils.getString(colorStr, null);
-
                     if (bgColor != null) {
                         if (!TextUtils.isEmpty(bgColor)) {
                             int colorInt = WXResourceUtils.getColor(bgColor);