baoyongzhang / SwipeMenuListView

[DEPRECATED] A swipe menu for ListView.
MIT License
3.51k stars 1.26k forks source link

误操作问题 #3

Closed x1a0b0 closed 10 years ago

x1a0b0 commented 10 years ago

水平滑动的时候能不能禁用ListView的垂直滑动,不然很容易触发误操作

baoyongzhang commented 10 years ago

水平滑动的时候ListView不能垂直滑动的,你说的是水平滑动后(菜单打开)禁止ListView垂直滑动?

x1a0b0 commented 10 years ago

不是,我在ListView外面套了一层SwipeRefreshLayout,这种情况下是会垂直滑动的

x1a0b0 commented 10 years ago

去掉SwipeRefreshLayout之后是正常的

baoyongzhang commented 10 years ago

我尝试解决一下

baoyongzhang commented 10 years ago

我加了一个OnSwipeListener,可以监听滑动开始和滑动结束,你在滑动开始的时候禁用SwipeRefreshLayout,滑动结束的时候启用,我测试可以解决。

listView.setOnSwipeListener(new OnSwipeListener() {

            @Override
            public void onSwipeStart(int position) {
                refreshLayout.setEnabled(false);
            }

            @Override
            public void onSwipeEnd(int position) {
                refreshLayout.setEnabled(true);
            }
        });
x1a0b0 commented 10 years ago

好的,非常感谢

ayyb1988 commented 9 years ago

@baoyongzhang ,thank you very much.

VeerHan commented 8 years ago

@baoyongzhang it works, thank u.

smilepasta commented 7 years ago

thank