public class MaterialTapTargetPrompt
extends java.lang.Object
For more information about onboarding and tap targets, read the Onboarding Material Design guidelines.
Modifier and Type | Class and Description |
---|---|
static class |
MaterialTapTargetPrompt.Builder
A builder to create a
MaterialTapTargetPrompt instance. |
static interface |
MaterialTapTargetPrompt.PromptStateChangeListener
Interface definition for a callback to be invoked when a prompts state changes.
|
Modifier and Type | Field and Description |
---|---|
static int |
STATE_DISMISSED
The prompt has been removed from view after the prompt has either been pressed somewhere
other than the prompt target or the system back button has been pressed.
|
static int |
STATE_DISMISSING
The
dismiss() method has been called and the prompt is being removed from view. |
static int |
STATE_FINISHED
The prompt has been removed from view after the prompt has been pressed in the focal area.
|
static int |
STATE_FINISHING
The
finish() method has been called and the prompt is being removed from view. |
static int |
STATE_FOCAL_PRESSED
The prompt target has been pressed in the focal area.
|
static int |
STATE_NON_FOCAL_PRESSED
The prompt has been pressed outside the focal area.
|
static int |
STATE_NOT_SHOWN
Prompt has yet to be shown.
|
static int |
STATE_REVEALED
Prompt reveal animation has finished and the prompt is displayed.
|
static int |
STATE_REVEALING
Prompt is reveal animation is running.
|
Modifier and Type | Method and Description |
---|---|
static MaterialTapTargetPrompt |
createDefault(PromptOptions promptOptions)
Creates a prompt with the supplied options.
|
void |
dismiss()
Removes the prompt from view, using a contract and fade animation.
|
void |
finish()
Removes the prompt from view, using a expand and fade animation.
|
int |
getState()
Get the current state of the prompt.
|
protected void |
onPromptStateChanged(int state)
Handles emitting the prompt state changed events.
|
void |
show()
Displays the prompt.
|
public static final int STATE_NOT_SHOWN
public static final int STATE_REVEALING
public static final int STATE_REVEALED
public static final int STATE_FOCAL_PRESSED
public static final int STATE_FINISHED
public static final int STATE_DISMISSING
dismiss()
method has been called and the prompt is being removed from view.public static final int STATE_DISMISSED
public static final int STATE_FINISHING
finish()
method has been called and the prompt is being removed from view.public static final int STATE_NON_FOCAL_PRESSED
public void show()
public int getState()
public void finish()
This is treated as if the user has touched the target focal point.
public void dismiss()
This is treated as if the user has touched outside the target focal point.
protected void onPromptStateChanged(int state)
state
- The state that the prompt is now in.public static MaterialTapTargetPrompt createDefault(PromptOptions promptOptions)
promptOptions
- The options to use to create the prompt.