public static class StaggeredGridLayoutManager.LayoutParams extends RecyclerView.LayoutParams
Note that if the orientation is StaggeredGridLayoutManager.VERTICAL
, the width parameter is ignored and if the
orientation is StaggeredGridLayoutManager.HORIZONTAL
the height parameter is ignored because child view is
expected to fill all of the space given to it.
Modifier and Type | Field and Description |
---|---|
static int |
INVALID_SPAN_ID
Span Id for Views that are not laid out yet.
|
bottomMargin, DEFAULT_MARGIN_RELATIVE, leftMargin, rightMargin, topMargin
FILL_PARENT, height, layoutAnimationParameters, MATCH_PARENT, width, WRAP_CONTENT
Constructor and Description |
---|
LayoutParams(Context c,
AttributeSet attrs) |
LayoutParams(int width,
int height) |
LayoutParams(RecyclerView.LayoutParams source) |
LayoutParams(ViewGroup.LayoutParams source) |
LayoutParams(ViewGroup.MarginLayoutParams source) |
Modifier and Type | Method and Description |
---|---|
int |
getSpanIndex()
Returns the Span index to which this View is assigned.
|
boolean |
isFullSpan()
Returns whether this View occupies all available spans or just one.
|
void |
setFullSpan(boolean fullSpan)
When set to true, the item will layout using all span area.
|
getViewAdapterPosition, getViewLayoutPosition, getViewPosition, isItemChanged, isItemRemoved, isViewInvalid, viewNeedsUpdate
copyMarginsFrom, encodeProperties, getLayoutDirection, getMarginEnd, getMarginStart, isLayoutRtl, isMarginRelative, onDebugDraw, resolveLayoutDirection, setLayoutDirection, setMarginEnd, setMargins, setMarginsRelative, setMarginStart
debug, setBaseAttributes, sizeToString
public static final int INVALID_SPAN_ID
public LayoutParams(Context c, AttributeSet attrs)
public LayoutParams(int width, int height)
public LayoutParams(ViewGroup.MarginLayoutParams source)
public LayoutParams(ViewGroup.LayoutParams source)
public LayoutParams(RecyclerView.LayoutParams source)
public void setFullSpan(boolean fullSpan)
fullSpan
- True if this item should traverse all spans.isFullSpan()
public boolean isFullSpan()
setFullSpan(boolean)
public final int getSpanIndex()
INVALID_SPAN_ID
.