In the Google IO 2013, Google has announced a new version of the Support Library, which includes ViewDragHelper
class.
I saw the docs, but I couldn't find any sample of usage for this class.
For example, a very typical situation: I have a custom view, which extends from FrameLayout
and allows to drag some of the View
s inside. For example, let it be a Button
. I override onTouchEvent()
and onInterceptTouchEvent()
within my custom view, and if the button of the rect contains the touch coordinates and this is not a simple click, then I start to drag.
So, what I must do with ViewDragHelper
to get that? The clicks to the Button
should process correctly.
android.v4.support.widget
package. – Nettles