AndroidSwipeLayout icon indicating copy to clipboard operation
AndroidSwipeLayout copied to clipboard

RecyclerView or ListView item open close frequently, bottomView location is offset.

Open gaoyan10 opened this issue 10 years ago • 3 comments

image Just like the screenshot, I use the showMode==LayDown. I found the code below may be cause the issue. SwipeLayout line 818.

void layoutLayDown() { View surfaceView = getSurfaceView(); Rect surfaceRect = mViewBoundCache.get(surfaceView); if(surfaceRect == null) surfaceRect = computeSurfaceLayoutArea(false); if (surfaceView != null) { surfaceView.layout(surfaceRect.left, surfaceRect.top, surfaceRect.right, surfaceRect.bottom); bringChildToFront(surfaceView); } View currentBottomView = getCurrentBottomView(); Rect bottomViewRect = mViewBoundCache.get(currentBottomView); if(bottomViewRect == null) bottomViewRect = computeBottomLayoutAreaViaSurface(ShowMode.LayDown, surfaceRect); if (currentBottomView != null) {

The Rect surfaceRect may be wrong. So I add some lines in method captureChildrenBound.

private void captureChildrenBound(){ View currentBottomView = getCurrentBottomView(); View surfaceView = getSurfaceView(); //gaoyan add if(getOpenStatus()==Status.Close){ mViewBoundCache.remove(currentBottomView); if (surfaceView != null) { //gaoyan add mViewBoundCache.remove(surfaceView); //gaoyan add } return; }

But the swipe is not smooth。How to solve this issue.

gaoyan10 avatar Apr 06 '16 06:04 gaoyan10

same issue

joy-jianqiang avatar Apr 28 '16 09:04 joy-jianqiang

same issue

ghost avatar Aug 02 '16 13:08 ghost

Same

rusty21 avatar Feb 09 '17 14:02 rusty21