getChildMeasureSpec

open fun getChildMeasureSpec(parentSize: Int, parentMode: Int, padding: Int, childDimension: Int, canScroll: Boolean): Int(source)

Calculate a MeasureSpec value for measuring a child view in one dimension.

Return

a MeasureSpec value for the child view

Parameters

parentSize

Size of the parent view where the child will be placed

parentMode

The measurement spec mode of the parent

padding

Total space currently consumed by other elements of parent

childDimension

Desired size of the child view, or MATCH_PARENT/WRAP_CONTENT. Generally obtained from the child view's LayoutParams

canScroll

true if the parent RecyclerView can scroll in this dimension


open fun getChildMeasureSpec(parentSize: Int, padding: Int, childDimension: Int, canScroll: Boolean): Int(source)

Deprecated

use getChildMeasureSpec

Calculate a MeasureSpec value for measuring a child view in one dimension.

Return

a MeasureSpec value for the child view

Parameters

parentSize

Size of the parent view where the child will be placed

padding

Total space currently consumed by other elements of the parent

childDimension

Desired size of the child view, or MATCH_PARENT/WRAP_CONTENT. Generally obtained from the child view's LayoutParams

canScroll

true if the parent RecyclerView can scroll in this dimension