recycler-view-divider / com.fondesa.recyclerviewdivider.manager.size / DefaultSizeManager

DefaultSizeManager

class DefaultSizeManager : FixedSizeManager

Default implementation of SizeManager that will calculate the size of each item using the drawable's dimensions. If the dimensions can't be calculated, a default size will be used.

Constructors

<init>

DefaultSizeManager(context: Context)

Constructor that assigns a default size equal to 1dp.

DefaultSizeManager(defaultSize: Int)

Constructor that assigns a default size equal to defaultSize.

Functions

itemSize

fun itemSize(drawable: Drawable, orientation: Int): Int

Inherited Functions

itemSize

fun itemSize(drawable: Drawable, orientation: Int, groupCount: Int, groupIndex: Int): Int

Defines a custom size for each group of divider.