Package-level declarations
Types
Takes leverage of not providing that damn layout res id
Takes leverage of not providing that damn layout res id
Takes leverage of not providing that damn layout res id
Takes leverage of not providing that damn layout res id
layout width must be match parent
/* USAGE val sectionItemDecoration = RecyclerSectionItemDecoration(R.id.list_item_section_text, R.layout.section_header object : RecyclerSectionItemDecoration.SectionCallback {
/* USAGE val sectionItemDecoration = RecyclerSectionItemDecoration(resources.getDimensionPixelSize(R.dimen.recycler_section_header_height), false, // true for sticky, false for not, R.id.list_item_section_text, R.layout.section_header object : RecyclerSectionItemDecoration.SectionCallback {
Persists scroll state for nested RecyclerViews.
ItemDecoration that adds space around items.
Properties
Functions
Extension function for recyclerDrag
Extension function for recyclerSwipe
Disable all user input to a recyclerview, passing touch events out
Generates a recycler view with match parent and a linearlayoutmanager, since it's so commonly used
To prevent the RecyclerView stealing touches from the bottom sheet fragment or any other fragment that scrolls, use this function If you're using other recycler views besides this one, use OrientationAwareRecyclerView for them
Adds an RecyclerView.ItemDecoration that draws a horizontal divider between items.
Set adapter of recyclerView
Don't forget to call ItemTouchHelper.attachToRecyclerView on this since it returns ItemTouchHelper or use addDrag as an extension function
Don't forget to call ItemTouchHelper.attachToRecyclerView on this since it returns ItemTouchHelper or use addSwipe
Usage
Adds an RecyclerView.ItemDecoration that draws a vertical divider between items.
Set a GridLayoutManager as this
layoutManager.
Calls RecyclerView.addItemDecoration with ItemOffsetDecoration as a parameter.
Sets a linear layout manager along with an adapter
Set a LinearLayoutManager as this
layoutManager.