daimajia / AndroidSwipeLayout

The Most Powerful Swipe Layout!
MIT License
12.38k stars 2.67k forks source link

Pullout bug #237

Closed yoonyoungkim closed 8 years ago

yoonyoungkim commented 9 years ago

First, Thank you for your help. It has been helpful to you using your project. By the way I find a bug. When I choose pullout mode, Leaving a space on the back of the list . I found out that SwipeLayout.java/layoutPullOut() have a problem. But your library operate well, I tried it decompile.

void layoutPullOut() {
    // origin code
    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.PullOut, surfaceRect);
    if (currentBottomView != null) {
        currentBottomView.layout(bottomViewRect.left, bottomViewRect.top, bottomViewRect.right, bottomViewRect.bottom);
    }
}

void layoutPullOut() {
    // decompile code
    Rect rect = computeSurfaceLayoutArea(false);
    View surfaceView = getSurfaceView();
    if(surfaceView != null)
    {
        surfaceView.layout(rect.left, rect.top, rect.right, rect.bottom);
        bringChildToFront(surfaceView);
    }
    rect = computeBottomLayoutAreaViaSurface(ShowMode.PullOut, rect);
    View currentBottomView = getCurrentBottomView();
    if(currentBottomView != null)
        currentBottomView.layout(rect.left, rect.top, rect.right, rect.bottom);
}

Can I do merge request? If not, please edit this code. Many people use your code.

j796160836 commented 8 years ago

Thanks Kim. You solved my problem. I replaced the code with decompiled code and works.

yoonyoungkim commented 8 years ago

Your project is very nice. It is very helpful for me. Thank you again:)