Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在视图上使用 Android 拖动 API (startDrag),但我需要使视图只能在一个方向上拖动(即仅底部)。有任何想法吗?!
您可以尝试我的解决方案,只更改所需的边距 - 水平拖动的左和右,或垂直拖动的顶部和底部:
https://stackoverflow.com/a/18806475/878126