public class LithoScrollView extends NestedScrollView implements HasLithoViewChildren
NestedScrollView
that allows to add more features needed for @VerticalScrollSpec
.Modifier and Type | Class and Description |
---|---|
static interface |
LithoScrollView.OnInterceptTouchListener |
static class |
LithoScrollView.ScrollPosition |
Constructor and Description |
---|
LithoScrollView(Context context) |
LithoScrollView(Context context,
AttributeSet attrs) |
LithoScrollView(Context context,
AttributeSet attrs,
int defStyleAttr) |
Modifier and Type | Method and Description |
---|---|
boolean |
dispatchNestedFling(float velocityX,
float velocityY,
boolean consumed)
NestedScrollView does not automatically consume the fling event.
|
void |
draw(Canvas canvas) |
void |
fling(int velocityX) |
void |
mount(ComponentTree contentComponentTree,
LithoScrollView.ScrollPosition scrollPosition,
ScrollStateListener scrollStateListener) |
void |
obtainLithoViewChildren(java.util.List<LithoView> lithoViews) |
boolean |
onInterceptTouchEvent(MotionEvent ev) |
protected void |
onScrollChanged(int l,
int t,
int oldl,
int oldt) |
boolean |
onTouchEvent(MotionEvent motionEvent) |
void |
setOnInterceptTouchListener(LithoScrollView.OnInterceptTouchListener onInterceptTouchListener) |
void |
unmount() |
public LithoScrollView(Context context)
public LithoScrollView(Context context, AttributeSet attrs)
public LithoScrollView(Context context, AttributeSet attrs, int defStyleAttr)
public boolean onInterceptTouchEvent(MotionEvent ev)
public void fling(int velocityX)
public void draw(Canvas canvas)
protected void onScrollChanged(int l, int t, int oldl, int oldt)
public boolean onTouchEvent(MotionEvent motionEvent)
public boolean dispatchNestedFling(float velocityX, float velocityY, boolean consumed)
RecyclerView#fling
Since this view is specifically made for vertically scrolling components, we always consume the
nested fling event just like recycler view.public void setOnInterceptTouchListener(LithoScrollView.OnInterceptTouchListener onInterceptTouchListener)
public void obtainLithoViewChildren(java.util.List<LithoView> lithoViews)
obtainLithoViewChildren
in interface HasLithoViewChildren
public void mount(ComponentTree contentComponentTree, LithoScrollView.ScrollPosition scrollPosition, ScrollStateListener scrollStateListener)
public void unmount()