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

顶部或者底部滑出抽屉,有禁止越界滑动的方法吗 #85

Open
ZengHongHua opened this issue Jan 14, 2021 · 1 comment
Open

Comments

@ZengHongHua
Copy link

从顶部拉出界面,拉出来后,还能往下拉,我知道这是一种越界回弹的效果,能禁止这种效果吗?
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);

@SimFG
Copy link

SimFG commented Mar 17, 2021

SmartSwipe.wrap(topMenu).addConsumer(newSpaceConsumer()).enableTop().getWrapper();这一句中的enableTop()取掉好像就可以

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