toggle menu
Litho
androidJvm
switch theme
search in API
litho-widget
/
com.facebook.litho.widget
/
EdgeSnappingSmoothScroller
Edge
Snapping
Smooth
Scroller
open
class
EdgeSnappingSmoothScroller
:
LinearSmoothScroller
LinearSmoothScroller subclass that snaps the target position to start/end or either ends.
Members
Constructors
Edge
Snapping
Smooth
Scroller
Link copied to clipboard
constructor
(
context
:
Context
,
snapPreference
:
Int
,
offset
:
Int
)
Properties
SNAP_TO_ANY
Link copied to clipboard
val
SNAP_TO_ANY
:
Int
=
0
SNAP_TO_END
Link copied to clipboard
val
SNAP_TO_END
:
Int
=
1
SNAP_TO_START
Link copied to clipboard
val
SNAP_TO_START
:
Int
=
-1
Functions
calculate
Dt
To
Fit
Link copied to clipboard
open
fun
calculateDtToFit
(
viewStart
:
Int
,
viewEnd
:
Int
,
boxStart
:
Int
,
boxEnd
:
Int
,
snapPreference
:
Int
)
:
Int
calculate
Dx
To
Make
Visible
Link copied to clipboard
open
fun
calculateDxToMakeVisible
(
view
:
View
,
snapPreference
:
Int
)
:
Int
calculate
Dy
To
Make
Visible
Link copied to clipboard
open
fun
calculateDyToMakeVisible
(
view
:
View
,
snapPreference
:
Int
)
:
Int
compute
Scroll
Vector
For
Position
Link copied to clipboard
open
fun
computeScrollVectorForPosition
(
targetPosition
:
Int
)
:
PointF
find
View
By
Position
Link copied to clipboard
open
fun
findViewByPosition
(
position
:
Int
)
:
View
get
Child
Count
Link copied to clipboard
open
fun
getChildCount
(
)
:
Int
get
Child
Position
Link copied to clipboard
open
fun
getChildPosition
(
view
:
View
)
:
Int
get
Layout
Manager
Link copied to clipboard
open
fun
getLayoutManager
(
)
:
RecyclerView.LayoutManager
get
Target
Position
Link copied to clipboard
open
fun
getTargetPosition
(
)
:
Int
instant
Scroll
To
Position
Link copied to clipboard
open
fun
instantScrollToPosition
(
position
:
Int
)
is
Pending
Initial
Run
Link copied to clipboard
open
fun
isPendingInitialRun
(
)
:
Boolean
is
Running
Link copied to clipboard
open
fun
isRunning
(
)
:
Boolean
set
Target
Position
Link copied to clipboard
open
fun
setTargetPosition
(
targetPosition
:
Int
)