顶部或者底部滑出抽屉,有禁止越界滑动的方法吗
ZengHongHua opened this issue · comments
从顶部拉出界面,拉出来后,还能往下拉,我知道这是一种越界回弹的效果,能禁止这种效果吗?
View topMenu = LayoutInflater.from(this).inflate(R.layout.drawer_top_layout, null);
topMenu.setLayoutParams(layoutParams);
SmartSwipeWrapper topMenuWrapper = SmartSwipe.wrap(topMenu).addConsumer(newSpaceConsumer()).enableTop().getWrapper();
DrawerConsumer mDrawerConsumer = new DrawerConsumer()
.setTopDrawerView(topMenuWrapper)
.setBottomDrawerView(bottomMenuWrapper)
.setScrimColor(0x7F000000)
.setShadowColor(0x80000000)
.setEdgeSize(SmartSwipe.dp2px(100, this))
.as(DrawerConsumer.class);
SmartSwipe.wrap(this).addConsumer(mDrawerConsumer);
把SmartSwipe.wrap(topMenu).addConsumer(newSpaceConsumer()).enableTop().getWrapper();
这一句中的enableTop()
取掉好像就可以