You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by ef...@apache.org on 2019/04/03 07:07:30 UTC
[incubator-weex] branch master updated: [Android] Fix list frozen
in wrong condition.
This is an automated email from the ASF dual-hosted git repository.
efurture pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-weex.git
The following commit(s) were added to refs/heads/master by this push:
new 833a7e7 [Android] Fix list frozen in wrong condition.
new 81a5902 Merge pull request #2251 from sunshl/bugfix_frozenlist
833a7e7 is described below
commit 833a7e7718a56a8d8728d06b4fc7ffb5ddfe727b
Author: huanglei.hl <hu...@alibaba-inc.com>
AuthorDate: Wed Mar 27 22:04:10 2019 +0800
[Android] Fix list frozen in wrong condition.
* issue: https://github.com/apache/incubator-weex/issues/2250
---
.../java/com/taobao/weex/ui/component/list/BasicListComponent.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/list/BasicListComponent.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/list/BasicListComponent.java
index 1d7e743..29b434e 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/list/BasicListComponent.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/list/BasicListComponent.java
@@ -734,9 +734,6 @@ public abstract class BasicListComponent<T extends ViewGroup & ListComponentView
}
if (isKeepScrollPosition) {
if(view.getInnerView().getLayoutManager() instanceof LinearLayoutManager){
- if(!view.getInnerView().isLayoutFrozen()){ //frozen, prevent layout when scroll
- view.getInnerView().setLayoutFrozen(true);
- }
if(keepPositionCell == null){
int last=((LinearLayoutManager)view.getInnerView().getLayoutManager()).findLastCompletelyVisibleItemPosition();
ListBaseViewHolder holder = (ListBaseViewHolder) view.getInnerView().findViewHolderForAdapterPosition(last);
@@ -744,6 +741,9 @@ public abstract class BasicListComponent<T extends ViewGroup & ListComponentView
keepPositionCell = holder.getComponent();
}
if(keepPositionCell != null) {
+ if(!view.getInnerView().isLayoutFrozen()){ //frozen, prevent layout when scroll
+ view.getInnerView().setLayoutFrozen(true);
+ }
if(keepPositionCellRunnable != null){
view.removeCallbacks(keepPositionCellRunnable);
}