|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectFrameLayout
android.support.wearable.view.CardScrollView
public class CardScrollView
Designed to host a CardFrame and provides special support for scrolling with expansion in both the upward and downward directions.
| Constructor Summary | |
|---|---|
CardScrollView(Context context)
|
|
CardScrollView(Context context,
AttributeSet attrs)
|
|
| Method Summary | |
|---|---|
void |
addView(View child,
int index,
ViewGroup.LayoutParams params)
|
boolean |
canScrollHorizontally(int direction)
|
int |
getAvailableScrollDelta(int direction)
Indicates how far the container may be vertically scrolled in the given direction. |
int |
getCardGravity()
Returns the current layout gravity for contained card frame. |
int |
getExpansionDirection()
Returns the current expansion direction for the contained CardFrame. |
float |
getExpansionFactor()
Returns the current expansion factor for the contained CardFrame. |
boolean |
isExpansionEnabled()
Indicates if expansion is enabled. |
WindowInsets |
onApplyWindowInsets(WindowInsets insets)
|
protected void |
onAttachedToWindow()
|
protected void |
onFinishInflate()
|
protected void |
onLayout(boolean changed,
int left,
int top,
int right,
int bottom)
|
protected void |
onMeasure(int widthMeasureSpec,
int heightMeasureSpec)
|
void |
setCardGravity(int gravity)
Applies gravity to adjust the vertical alignment of the contained card frame when it's shorter than the containing view. |
void |
setExpansionDirection(int direction)
Control which direction expansion occurs. |
void |
setExpansionEnabled(boolean enableExpansion)
Whether the height of the card is permitted to increase beyond the card layout bounds. |
void |
setExpansionFactor(float expansionFactor)
Changes the expansion factor for the contained CardFrame. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CardScrollView(Context context)
public CardScrollView(Context context,
AttributeSet attrs)
| Method Detail |
|---|
protected void onAttachedToWindow()
public WindowInsets onApplyWindowInsets(WindowInsets insets)
public void addView(View child,
int index,
ViewGroup.LayoutParams params)
protected void onFinishInflate()
public void setExpansionEnabled(boolean enableExpansion)
enableExpansion - whether content will be allowed to expandsetExpansionDirection(int)public boolean isExpansionEnabled()
CardFrame.isExpansionEnabled()public void setExpansionDirection(int direction)
direction - the direction for content expansionpublic float getExpansionFactor()
CardFrame.getExpansionFactor()public void setExpansionFactor(float expansionFactor)
CardFrame#setExpansionFactor()public int getExpansionDirection()
CardFrame.getExpansionDirection()public void setCardGravity(int gravity)
Supported gravity values are either Gravity#TOP or Gravity#BOTTOM.
public int getCardGravity()
setCardGravity(int)public boolean canScrollHorizontally(int direction)
public int getAvailableScrollDelta(int direction)
When providing a positive direction value, the return value indicates the available increase in scroll position (how far the content can move up). When providing a negative direction value, the return value indicates the available decrease in scroll position (how far the content can move down).
direction - the direction value to check, only the sign of the value is significant
protected void onMeasure(int widthMeasureSpec,
int heightMeasureSpec)
protected void onLayout(boolean changed,
int left,
int top,
int right,
int bottom)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||