LayoutParams
open class LayoutParams : RecyclerView.LayoutParams
LayoutParams used by StaggeredGridLayoutManager.
Note that if the orientation is VERTICAL
, the width parameter is ignored and if the orientation is HORIZONTAL
the height parameter is ignored because child view is expected to fill all of the space given to it.
Summary
Constants | |
---|---|
static Int |
Span Id for Views that are not laid out yet. |
Public constructors | |
---|---|
<init>(c: Context!, attrs: AttributeSet!) |
|
<init>(source: MarginLayoutParams!) |
|
<init>(source: LayoutParams!) |
|
<init>(source: RecyclerView.LayoutParams!) |
Public methods | |
---|---|
Int |
Returns the Span index to which this View is assigned. |
open Boolean |
Returns whether this View occupies all available spans or just one. |
open Unit |
setFullSpan(fullSpan: Boolean) When set to true, the item will layout using all span area. |
Inherited functions | |
---|---|
Constants
INVALID_SPAN_ID
static val INVALID_SPAN_ID: Int
Span Id for Views that are not laid out yet.
Value: -1
Public constructors
<init>
LayoutParams(
c: Context!,
attrs: AttributeSet!)
<init>
LayoutParams(source: MarginLayoutParams!)
<init>
LayoutParams(source: LayoutParams!)
<init>
LayoutParams(source: RecyclerView.LayoutParams!)
Public methods
getSpanIndex
fun getSpanIndex(): Int
Returns the Span index to which this View is assigned.
Return | |
---|---|
Int |
The Span index of the View. If View is not yet assigned to any span, returns INVALID_SPAN_ID . |
isFullSpan
open fun isFullSpan(): Boolean
Returns whether this View occupies all available spans or just one.
Return | |
---|---|
Boolean |
True if the View occupies all spans or false otherwise. |
See Also
setFullSpan
open fun setFullSpan(fullSpan: Boolean): Unit
When set to true, the item will layout using all span area. That means, if orientation is vertical, the view will have full width; if orientation is horizontal, the view will have full height.
Parameters | |
---|---|
fullSpan |
Boolean: True if this item should traverse all spans. |
See Also