|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectFrameLayout
android.support.wearable.view.WatchViewStub
public class WatchViewStub
A WatchViewStub allows for the use of different sub-layouts depending on the
shape of the device screen as reported by
onApplyWindowInsets.
If the call is not delivered by initial measurement the container will be assumed rectangular.
| Nested Class Summary | |
|---|---|
static interface |
WatchViewStub.OnLayoutInflatedListener
Listener for detecting when internal layout inflation has completed. |
| Constructor Summary | |
|---|---|
WatchViewStub(Context context)
|
|
WatchViewStub(Context context,
AttributeSet attrs)
|
|
WatchViewStub(Context context,
AttributeSet attrs,
int defStyle)
|
|
| Method Summary | |
|---|---|
void |
inflate()
Inflate the appropriate child layout for the last known container. |
WindowInsets |
onApplyWindowInsets(WindowInsets insets)
|
protected void |
onAttachedToWindow()
|
void |
onMeasure(int widthMeasureSpec,
int heightMeasureSpec)
|
void |
setOnLayoutInflatedListener(WatchViewStub.OnLayoutInflatedListener listener)
Set a listener to be notified when one of the specified sub-layouts is inflated into this stub container. |
void |
setRectLayout(int resId)
Set a layout resource to be inflated when this stub is within a rectangular container. |
void |
setRoundLayout(int resId)
Set a layout resource to be inflated when this stub is within a round container. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WatchViewStub(Context context)
public WatchViewStub(Context context,
AttributeSet attrs)
public WatchViewStub(Context context,
AttributeSet attrs,
int defStyle)
| Method Detail |
|---|
public void setOnLayoutInflatedListener(WatchViewStub.OnLayoutInflatedListener listener)
If your app needs to perform a series of
findViewById lookups on the final inflated
layout this callback is a great time to do so.
listener - Listener to notifypublic void setRectLayout(int resId)
resId - Resource id of a child layout to inflatepublic void setRoundLayout(int resId)
resId - Resource id of a child layout to inflateprotected void onAttachedToWindow()
public WindowInsets onApplyWindowInsets(WindowInsets insets)
public void inflate()
public void onMeasure(int widthMeasureSpec,
int heightMeasureSpec)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||