|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectFrameLayout
android.support.wearable.view.DismissOverlayView
public class DismissOverlayView
A view for implementing long-press-to-dismiss in an app.
DismissOverlayView should be added to your layout such that it draws
full-screen and over all other views. To use it, set the intro text using
setIntroText(CharSequence) and call showIntroIfNecessary()
in your activity's onCreate (or your fragment's
onCreateView). Then, use a GestureDetector in your activity to
detect long press gestures; when one is found, call show() on your
DismissOverlayView. DismissOverlayView takes care of all
of the hiding, showing, and dismissal logic for you; setting its visibility
or alpha may lead to unintended behavior.
| Constructor Summary | |
|---|---|
DismissOverlayView(Context context)
|
|
DismissOverlayView(Context context,
AttributeSet attrs)
|
|
DismissOverlayView(Context context,
AttributeSet attrs,
int defStyle)
|
|
| Method Summary | |
|---|---|
boolean |
performClick()
|
void |
setIntroText(java.lang.CharSequence str)
Set the intro text. |
void |
setIntroText(int textResId)
Set the intro text. |
void |
show()
Show the exit button. |
void |
showIntroIfNecessary()
Displays the intro overlay over your app if necessary. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DismissOverlayView(Context context)
public DismissOverlayView(Context context,
AttributeSet attrs)
public DismissOverlayView(Context context,
AttributeSet attrs,
int defStyle)
| Method Detail |
|---|
public void setIntroText(java.lang.CharSequence str)
public void setIntroText(int textResId)
public void showIntroIfNecessary()
public void show()
public boolean performClick()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||