class StaggeredDividerBuilder
Builds a divider for a StaggeredGridLayoutManager or its subclasses. The following properties of a divider can be configured:
context - the Context used to build the divider.
StaggeredDividerBuilder(context: Context)
Builds a divider for a StaggeredGridLayoutManager or its subclasses. The following properties of a divider can be configured: |
fun asSpace(): StaggeredDividerBuilder
Sets the divider as a simple space, so the divider leaves the space between two cells but it is not rendered. Since the rendering is totally skipped in this case, it's better than using a transparent color. |
|
fun build(): BaseDividerItemDecoration
Creates the RecyclerView.ItemDecoration using the configuration specified in this builder. If this builder doesn't specify the configuration of some divider's properties, those properties will be picked from the theme or their default will be used. |
|
fun color(color: Int): StaggeredDividerBuilder
Sets the divider's color. If the color of this divider is not completely opaque (contains some transparency), this builder can't ensure a correct rendering. |
|
fun colorRes(colorRes: Int): StaggeredDividerBuilder
Sets the divider's color. If the color of this divider is not completely opaque (contains some transparency), this builder can't ensure a correct rendering. |
|
fun hideSideDividers(): StaggeredDividerBuilder
Hides the side dividers of the grid. The side dividers are the ones before the first column and after the last column. |
|
fun size(size: Int, sizeUnit: Int = TypedValue.COMPLEX_UNIT_PX): StaggeredDividerBuilder
Sets the divider's size. The size of an horizontal divider is its height. The size of a vertical divider is its width. |