SwipeDelMenuLayout icon indicating copy to clipboard operation
SwipeDelMenuLayout copied to clipboard

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

Open qianmang2 opened this issue 7 years ago • 1 comments

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

qianmang2 avatar Aug 06 '18 12:08 qianmang2

@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;
}

olyvcn avatar Mar 13 '20 02:03 olyvcn