Class StickyHeaderDecoration
- java.lang.Object
-
- androidx.recyclerview.widget.RecyclerView.ItemDecoration
-
- com.cheetahdigital.uikit.widget.sticky.StickyHeaderDecoration
-
public class StickyHeaderDecoration extends androidx.recyclerview.widget.RecyclerView.ItemDecoration
For use on RecyclerViews to achieve a Sticky Header Implementation
-
-
Field Summary
Fields Modifier and Type Field Description static long
NO_HEADER_ID
-
Constructor Summary
Constructors Constructor Description StickyHeaderDecoration(StickyHeaderAdapter adapter)
StickyHeaderDecoration(StickyHeaderAdapter adapter, boolean renderInLine)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearHeaderCache()
Clears the header view cache.void
getItemOffsets(android.graphics.Rect outRect, android.view.View view, androidx.recyclerview.widget.RecyclerView parent, androidx.recyclerview.widget.RecyclerView.State state)
void
onDrawOver(android.graphics.Canvas canvas, androidx.recyclerview.widget.RecyclerView parent, androidx.recyclerview.widget.RecyclerView.State state)
-
-
-
Field Detail
-
NO_HEADER_ID
public static final long NO_HEADER_ID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
StickyHeaderDecoration
public StickyHeaderDecoration(StickyHeaderAdapter adapter)
-
StickyHeaderDecoration
public StickyHeaderDecoration(StickyHeaderAdapter adapter, boolean renderInLine)
-
-
Method Detail
-
getItemOffsets
public void getItemOffsets(android.graphics.Rect outRect, android.view.View view, androidx.recyclerview.widget.RecyclerView parent, androidx.recyclerview.widget.RecyclerView.State state)
- Overrides:
getItemOffsets
in classandroidx.recyclerview.widget.RecyclerView.ItemDecoration
-
onDrawOver
public void onDrawOver(android.graphics.Canvas canvas, androidx.recyclerview.widget.RecyclerView parent, androidx.recyclerview.widget.RecyclerView.State state)
- Overrides:
onDrawOver
in classandroidx.recyclerview.widget.RecyclerView.ItemDecoration
-
clearHeaderCache
public void clearHeaderCache()
Clears the header view cache. Headers will be recreated and rebound on list scroll after this method has been called.
-
-