viewdraghelper

Why is view dragged with ViewDragHelper reset to its original position on layout()?

与世无争的帅哥 提交于 2019-11-28 23:33:53
I am implementing a custom expandable action bar in my game. I am using ViewDragHelper to handle the dragging and flinging of the bar view, which is contained in a LinearLayout I subclassed to attach the ViewDragHelper. The following links have been of great help to achieve this: Tutorial on the ViewDragHelper: http://flavienlaurent.com/blog/2013/08/28/each-navigation-drawer-hides-a-viewdraghelper/ Mastering the Android touch system: https://www.youtube.com/watch?v=EZAoJU-nUyI (which has given me they key to make Views clickable and draggable) The only issue I am encountering is the behavior

Why is view dragged with ViewDragHelper reset to its original position on layout()?

ぐ巨炮叔叔 提交于 2019-11-27 15:04:40
问题 I am implementing a custom expandable action bar in my game. I am using ViewDragHelper to handle the dragging and flinging of the bar view, which is contained in a LinearLayout I subclassed to attach the ViewDragHelper. The following links have been of great help to achieve this: Tutorial on the ViewDragHelper: http://flavienlaurent.com/blog/2013/08/28/each-navigation-drawer-hides-a-viewdraghelper/ Mastering the Android touch system: https://www.youtube.com/watch?v=EZAoJU-nUyI (which has