public class StickyRecyclerHeadersDecoration
extends android.support.v7.widget.RecyclerView.ItemDecoration
| Constructor and Description |
|---|
StickyRecyclerHeadersDecoration(StickyRecyclerHeadersAdapter adapter) |
| Modifier and Type | Method and Description |
|---|---|
int |
findHeaderPositionUnder(int x,
int y)
Gets the position of the header under the specified (x, y) coordinates.
|
android.view.View |
getHeaderView(android.support.v7.widget.RecyclerView parent,
int position)
Gets the header view for the associated position.
|
void |
getItemOffsets(android.graphics.Rect outRect,
android.view.View view,
android.support.v7.widget.RecyclerView parent,
android.support.v7.widget.RecyclerView.State state) |
void |
invalidateHeaders()
Invalidates cached headers.
|
void |
onDrawOver(android.graphics.Canvas canvas,
android.support.v7.widget.RecyclerView parent,
android.support.v7.widget.RecyclerView.State state) |
public StickyRecyclerHeadersDecoration(StickyRecyclerHeadersAdapter adapter)
public void getItemOffsets(android.graphics.Rect outRect,
android.view.View view,
android.support.v7.widget.RecyclerView parent,
android.support.v7.widget.RecyclerView.State state)
getItemOffsets in class android.support.v7.widget.RecyclerView.ItemDecorationpublic void onDrawOver(android.graphics.Canvas canvas,
android.support.v7.widget.RecyclerView parent,
android.support.v7.widget.RecyclerView.State state)
onDrawOver in class android.support.v7.widget.RecyclerView.ItemDecorationpublic int findHeaderPositionUnder(int x,
int y)
x - x-coordinatey - y-coordinatepublic android.view.View getHeaderView(android.support.v7.widget.RecyclerView parent,
int position)
parent - the recyclerviewposition - the position to get the header view forpublic void invalidateHeaders()