|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectViewGroup
android.support.wearable.view.CardFrame
public class CardFrame
Wraps a view in a card-styled frame with a white background, rounded corners and a light
drop-shadow. This layout is designed to be given a height of wrap_content within a container with a fixed height.
In most cases, developers will contain this view within a CardScrollView, or use a
CardFragment which provides a CardFrame inside a CardScrollView.
| Field Summary | |
|---|---|
static int |
EXPAND_DOWN
|
static int |
EXPAND_UP
|
static float |
NO_EXPANSION
|
| Constructor Summary | |
|---|---|
CardFrame(Context context)
|
|
CardFrame(Context context,
AttributeSet attrs)
|
|
CardFrame(Context context,
AttributeSet attrs,
int defStyle)
|
|
| Method Summary | |
|---|---|
void |
addView(View child)
|
void |
addView(View child,
int index)
|
void |
addView(View child,
int index,
ViewGroup.LayoutParams params)
|
void |
addView(View child,
ViewGroup.LayoutParams params)
|
protected boolean |
drawChild(Canvas canvas,
View child,
long drawingTime)
|
protected static int |
getDefaultSize(int size,
int measureSpec,
boolean greedy)
Get a default size, will be as small as possible unless forced by the parent, or greedy is specified. |
int |
getExpansionDirection()
Returns the current expansion direction, either EXPAND_UP or EXPAND_DOWN. |
float |
getExpansionFactor()
Returns the current expansionFactor which is the maximum height of this view as a multiple of the parent view's height. |
boolean |
isExpansionEnabled()
Indicates whether expansion is on. |
WindowInsets |
onApplyWindowInsets(WindowInsets insets)
|
protected void |
onAttachedToWindow()
|
void |
onInitializeAccessibilityEvent(AccessibilityEvent event)
|
void |
onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info)
|
protected void |
onLayout(boolean changed,
int left,
int top,
int right,
int bottom)
|
protected void |
onMeasure(int widthMeasureSpec,
int heightMeasureSpec)
|
void |
setExpansionDirection(int direction)
Sets the direction in which content expands. |
void |
setExpansionEnabled(boolean enabled)
Enables support contents which maybe be larger than the card's container. |
void |
setExpansionFactor(float expansionFactor)
Sets the allowed expansion amount as a multiple of the parent height. |
boolean |
shouldDelayChildPressedState()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final float NO_EXPANSION
public static final int EXPAND_UP
public static final int EXPAND_DOWN
| Constructor Detail |
|---|
public CardFrame(Context context)
public CardFrame(Context context,
AttributeSet attrs)
public CardFrame(Context context,
AttributeSet attrs,
int defStyle)
| Method Detail |
|---|
public void setExpansionEnabled(boolean enabled)
public void setExpansionDirection(int direction)
public void setExpansionFactor(float expansionFactor)
public int getExpansionDirection()
EXPAND_UP or EXPAND_DOWN.
public boolean isExpansionEnabled()
expansionFactor times the parent view's height. When expansion is enabled,
content which is taller than this will have a fading effect applied to the expanding edge,
otherwise content is simply clipped.
public float getExpansionFactor()
protected void onAttachedToWindow()
public WindowInsets onApplyWindowInsets(WindowInsets insets)
protected void onMeasure(int widthMeasureSpec,
int heightMeasureSpec)
protected static int getDefaultSize(int size,
int measureSpec,
boolean greedy)
protected void onLayout(boolean changed,
int left,
int top,
int right,
int bottom)
protected boolean drawChild(Canvas canvas,
View child,
long drawingTime)
public void addView(View child)
public void addView(View child,
int index)
public void addView(View child,
ViewGroup.LayoutParams params)
public void addView(View child,
int index,
ViewGroup.LayoutParams params)
public boolean shouldDelayChildPressedState()
public void onInitializeAccessibilityEvent(AccessibilityEvent event)
public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||