public static class GpCollapsingToolbar.LayoutParams
extends android.widget.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
GpCollapsingToolbar. |
| Constructor and Description |
|---|
LayoutParams(android.content.Context c,
android.util.AttributeSet attrs) |
LayoutParams(android.widget.FrameLayout.LayoutParams source) |
LayoutParams(int width,
int height) |
LayoutParams(int width,
int height,
int gravity) |
LayoutParams(android.view.ViewGroup.LayoutParams p) |
LayoutParams(android.view.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. |
public static final int COLLAPSE_MODE_OFF
public static final int COLLAPSE_MODE_PIN
GpCollapsingToolbar.public static final int COLLAPSE_MODE_PARALLAX
setParallaxMultiplier(float)
to change the multiplier used.public LayoutParams(android.content.Context c,
android.util.AttributeSet attrs)
public LayoutParams(int width,
int height)
public LayoutParams(int width,
int height,
int gravity)
public LayoutParams(android.view.ViewGroup.LayoutParams p)
public LayoutParams(android.view.ViewGroup.MarginLayoutParams source)
public LayoutParams(android.widget.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)