Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

点击其他地方无法关闭已打开侧滑的item #72

Open
qianmang2 opened this issue Aug 6, 2018 · 1 comment
Open

点击其他地方无法关闭已打开侧滑的item #72

qianmang2 opened this issue Aug 6, 2018 · 1 comment

Comments

@qianmang2
Copy link

点击其他地方无法关闭已打开侧滑的item

@olyvcn
Copy link

olyvcn commented Mar 13, 2020

@qianmang2

方法如下,如RecyclerView的空白区域

//点击RecyclerView的空白区域时关闭菜单
@OnTouch(R.id.list)
public boolean cancelSwipeMenuLayout(View view, MotionEvent event) {
    if (event.getAction() == MotionEvent.ACTION_UP) {
        SwipeMenuLayout viewCache = SwipeMenuLayout.getViewCache();
        if (null != viewCache) {
            viewCache.smoothClose();
        }
    }
    return false;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants