You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by zs...@apache.org on 2017/08/16 02:50:43 UTC
[1/2] incubator-weex git commit: *[android] fix list on refresh
header lost bug in viewpager
Repository: incubator-weex
Updated Branches:
refs/heads/0.16-dev b903e3c44 -> a0581f009
*[android] fix list on refresh header lost bug in viewpager
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/fc824a03
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/fc824a03
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/fc824a03
Branch: refs/heads/0.16-dev
Commit: fc824a0331667fdd4a342534d01d44a5bea0035d
Parents: 096c59b
Author: jianbai.gbj <ji...@alibaba-inc.com>
Authored: Tue Aug 15 17:17:27 2017 +0800
Committer: jianbai.gbj <ji...@alibaba-inc.com>
Committed: Tue Aug 15 17:17:27 2017 +0800
----------------------------------------------------------------------
.../weex/ui/view/refresh/core/WXSwipeLayout.java | 15 +++++++++++++--
.../weex/ui/view/refresh/wrapper/BaseBounceView.java | 2 +-
2 files changed, 14 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/fc824a03/android/sdk/src/main/java/com/taobao/weex/ui/view/refresh/core/WXSwipeLayout.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/view/refresh/core/WXSwipeLayout.java b/android/sdk/src/main/java/com/taobao/weex/ui/view/refresh/core/WXSwipeLayout.java
index 1312250..0b5de59 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/view/refresh/core/WXSwipeLayout.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/view/refresh/core/WXSwipeLayout.java
@@ -157,10 +157,21 @@ public class WXSwipeLayout extends FrameLayout implements NestedScrollingParent
@Override
protected void onAttachedToWindow() {
super.onAttachedToWindow();
- mTargetView = getChildAt(0);
- setRefreshView();
+ if(mTargetView == null && getChildCount() > 0){
+ mTargetView = getChildAt(0);
+ }
+ if(mTargetView != null){
+ if(headerView == null || footerView == null){
+ setRefreshView();
+ }
+ }
}
+
+ public void addTargetView(View mInnerView){
+ this.addView(mInnerView, new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.MATCH_PARENT));
+ setRefreshView();
+ }
/**
* Init refresh view or loading view
*/
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/fc824a03/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 c8c25dc..2319f8c 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
@@ -96,7 +96,7 @@ public abstract class BaseBounceView<T extends View> extends FrameLayout {
mInnerView = setInnerView(context);
if (mInnerView == null)
return null;
- swipeLayout.addView(mInnerView, new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.MATCH_PARENT));
+ swipeLayout.addTargetView(mInnerView);
addView(swipeLayout, LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
return swipeLayout;
}
[2/2] incubator-weex git commit: Merge branch
'0.16-dev-fix-list-header-onfresh-lost' into 0.16-dev
Posted by zs...@apache.org.
Merge branch '0.16-dev-fix-list-header-onfresh-lost' into 0.16-dev
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/a0581f00
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/a0581f00
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/a0581f00
Branch: refs/heads/0.16-dev
Commit: a0581f009234fffdd1e49a8b3b8d421ff68e422c
Parents: b903e3c fc824a0
Author: zshshr <zh...@gmail.com>
Authored: Wed Aug 16 10:50:24 2017 +0800
Committer: zshshr <zh...@gmail.com>
Committed: Wed Aug 16 10:50:24 2017 +0800
----------------------------------------------------------------------
.../weex/ui/view/refresh/core/WXSwipeLayout.java | 15 +++++++++++++--
.../weex/ui/view/refresh/wrapper/BaseBounceView.java | 2 +-
2 files changed, 14 insertions(+), 3 deletions(-)
----------------------------------------------------------------------