android-components / mozilla.components.browser.tabstray / TabTouchCallback

TabTouchCallback

open class TabTouchCallback : SimpleCallback (source)

An ItemTouchHelper.Callback for support gestures on tabs in the tray.

Constructors

Name Summary
<init> TabTouchCallback(observable: Observable<Observer>)
An ItemTouchHelper.Callback for support gestures on tabs in the tray.

Functions

Name Summary
alphaForItemSwipe open fun alphaForItemSwipe(dX: Float, distanceToAlphaMin: Int): Float
Sets the alpha value for a swipe gesture. This is useful for inherited classes to provide their own values.
onChildDraw open fun onChildDraw(c: <ERROR CLASS>, recyclerView: RecyclerView, viewHolder: ViewHolder, dX: Float, dY: Float, actionState: Int, isCurrentlyActive: Boolean): Unit
onMove open fun onMove(p0: RecyclerView, p1: ViewHolder, p2: ViewHolder): Boolean
onSwiped open fun onSwiped(viewHolder: ViewHolder, direction: Int): Unit

Extension Functions

Name Summary
loadResourceAsString fun Any.loadResourceAsString(path: String): String
Loads a file from the resources folder and returns its content as a string object.