public static class CollapsingToolbarLayout.LayoutParams extends FrameLayout.LayoutParams
Modifier and Type | Field and Description |
---|---|
static int |
COLLAPSE_MODE_OFF
The view will act as normal with no collapsing behavior.
|
static int |
COLLAPSE_MODE_PARALLAX
The view will scroll in a parallax fashion.
|
static int |
COLLAPSE_MODE_PIN
The view will pin in place until it reaches the bottom of the
CollapsingToolbarLayout . |
gravity, UNSPECIFIED_GRAVITY
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(FrameLayout.LayoutParams source) |
LayoutParams(int width,
int height) |
LayoutParams(int width,
int height,
int gravity) |
LayoutParams(ViewGroup.LayoutParams p) |
LayoutParams(ViewGroup.MarginLayoutParams source) |
Modifier and Type | Method and Description |
---|---|
int |
getCollapseMode()
Returns the requested collapse mode.
|
float |
getParallaxMultiplier()
Returns the parallax scroll multiplier used in conjunction with
COLLAPSE_MODE_PARALLAX . |
void |
setCollapseMode(int collapseMode)
Set the collapse mode.
|
void |
setParallaxMultiplier(float multiplier)
Set the parallax scroll multiplier used in conjunction with
COLLAPSE_MODE_PARALLAX . |
copyMarginsFrom, encodeProperties, getLayoutDirection, getMarginEnd, getMarginStart, isLayoutRtl, isMarginRelative, onDebugDraw, resolveLayoutDirection, setLayoutDirection, setMarginEnd, setMargins, setMarginsRelative, setMarginStart
debug, setBaseAttributes, sizeToString
public static final int COLLAPSE_MODE_OFF
public static final int COLLAPSE_MODE_PIN
CollapsingToolbarLayout
.public static final int COLLAPSE_MODE_PARALLAX
setParallaxMultiplier(float)
to change the multiplier used.public LayoutParams(Context c, AttributeSet attrs)
public LayoutParams(int width, int height)
public LayoutParams(int width, int height, int gravity)
public LayoutParams(ViewGroup.LayoutParams p)
public LayoutParams(ViewGroup.MarginLayoutParams source)
public LayoutParams(FrameLayout.LayoutParams source)
public void setCollapseMode(int collapseMode)
collapseMode
- one of COLLAPSE_MODE_OFF
, COLLAPSE_MODE_PIN
or COLLAPSE_MODE_PARALLAX
.public int getCollapseMode()
COLLAPSE_MODE_OFF
, COLLAPSE_MODE_PIN
or COLLAPSE_MODE_PARALLAX
.public void setParallaxMultiplier(float multiplier)
COLLAPSE_MODE_PARALLAX
. A value of 0.0
indicates no movement at all,
1.0f
indicates normal scroll movement.multiplier
- the multiplier.getParallaxMultiplier()
public float getParallaxMultiplier()
COLLAPSE_MODE_PARALLAX
.setParallaxMultiplier(float)