@@ -247,7 +247,7 @@ private constructor(context: Context, private val parentView: ViewGroup, private
247247 *
248248 * @see .STATE_SETTLING
249249 */
250- fun onViewDragStateChanged (state : Int ) {}
250+ open fun onViewDragStateChanged (state : Int ) {}
251251
252252 /* *
253253 * Called when the captured view's position changes as the result of a drag or settle.
@@ -258,7 +258,7 @@ private constructor(context: Context, private val parentView: ViewGroup, private
258258 * @param dx Change in X position from the last call
259259 * @param dy Change in Y position from the last call
260260 */
261- fun onViewPositionChanged (changedView : View ? , left : Int , top : Int , dx : Int , dy : Int ) {}
261+ open fun onViewPositionChanged (changedView : View ? , left : Int , top : Int , dx : Int , dy : Int ) {}
262262
263263 /* *
264264 * Called when a child view is captured for dragging or settling. The ID of the pointer
@@ -269,7 +269,7 @@ private constructor(context: Context, private val parentView: ViewGroup, private
269269 * @param capturedChild Child view that was captured
270270 * @param activePointerId Pointer id tracking the child capture
271271 */
272- fun onViewCaptured (capturedChild : View , activePointerId : Int ) {}
272+ open fun onViewCaptured (capturedChild : View , activePointerId : Int ) {}
273273
274274 /* *
275275 * Called when the child view is no longer being actively dragged.
@@ -290,7 +290,7 @@ private constructor(context: Context, private val parentView: ViewGroup, private
290290 * @param xvel X velocity of the pointer as it left the screen in pixels per second.
291291 * @param yvel Y velocity of the pointer as it left the screen in pixels per second.
292292 */
293- fun onViewReleased (releasedChild : View ? , xvel : Float , yvel : Float ) {}
293+ open fun onViewReleased (releasedChild : View ? , xvel : Float , yvel : Float ) {}
294294
295295 /* *
296296 * Called when one of the subscribed edges in the parent view has been touched
@@ -306,7 +306,7 @@ private constructor(context: Context, private val parentView: ViewGroup, private
306306 *
307307 * @see .EDGE_BOTTOM
308308 */
309- fun onEdgeTouched (edgeFlags : Int , pointerId : Int ) {}
309+ open fun onEdgeTouched (edgeFlags : Int , pointerId : Int ) {}
310310
311311 /* *
312312 * Called when the given edge may become locked. This can happen if an edge drag
@@ -317,7 +317,7 @@ private constructor(context: Context, private val parentView: ViewGroup, private
317317 * @param edgeFlags A combination of edge flags describing the edge(s) locked
318318 * @return true to lock the edge, false to leave it unlocked
319319 */
320- fun onEdgeLock (edgeFlags : Int ): Boolean {
320+ open fun onEdgeLock (edgeFlags : Int ): Boolean {
321321 return false
322322 }
323323
@@ -335,15 +335,15 @@ private constructor(context: Context, private val parentView: ViewGroup, private
335335 *
336336 * @see .EDGE_BOTTOM
337337 */
338- fun onEdgeDragStarted (edgeFlags : Int , pointerId : Int ) {}
338+ open fun onEdgeDragStarted (edgeFlags : Int , pointerId : Int ) {}
339339
340340 /* *
341341 * Called to determine the Z-order of child views.
342342 *
343343 * @param index the ordered position to query for
344344 * @return index of the view that should be ordered at position `index`
345345 */
346- fun getOrderedChildIndex (index : Int ): Int {
346+ open fun getOrderedChildIndex (index : Int ): Int {
347347 return index
348348 }
349349
@@ -354,7 +354,7 @@ private constructor(context: Context, private val parentView: ViewGroup, private
354354 * @param child Child view to check
355355 * @return range of horizontal motion in pixels
356356 */
357- fun getViewHorizontalDragRange (child : View ): Int {
357+ open fun getViewHorizontalDragRange (child : View ): Int {
358358 return 0
359359 }
360360
@@ -365,7 +365,7 @@ private constructor(context: Context, private val parentView: ViewGroup, private
365365 * @param child Child view to check
366366 * @return range of vertical motion in pixels
367367 */
368- fun getViewVerticalDragRange (child : View ): Int {
368+ open fun getViewVerticalDragRange (child : View ): Int {
369369 return 0
370370 }
371371
@@ -1470,4 +1470,4 @@ private constructor(context: Context, private val parentView: ViewGroup, private
14701470 }
14711471 return true
14721472 }
1473- }
1473+ }
0 commit comments