@Implements(value=android.widget.Toast.class) public class ShadowToast extends Object
Toast.| Constructor and Description |
|---|
ShadowToast() |
| Modifier and Type | Method and Description |
|---|---|
void |
__constructor__(android.content.Context context) |
void |
cancel() |
int |
getDuration() |
int |
getGravity() |
static android.widget.Toast |
getLatestToast()
Non-Android accessor that returns the most recently shown
Toast |
static String |
getTextOfLatestToast()
Non-Android accessor that returns the text of the most recently shown
Toast |
android.view.View |
getView() |
int |
getXOffset() |
int |
getYOffset() |
static android.widget.Toast |
makeText(android.content.Context context,
CharSequence text,
int duration) |
static android.widget.Toast |
makeText(android.content.Context context,
int resId,
int duration) |
static void |
reset()
Non-Android accessor that discards the recorded
Toasts |
void |
setDuration(int duration) |
void |
setGravity(int gravity,
int xOffset,
int yOffset) |
void |
setText(CharSequence text) |
void |
setText(int resId) |
void |
setView(android.view.View view) |
void |
show() |
static boolean |
showedCustomToast(CharSequence message,
int layoutResourceIdToCheckForMessage)
Non-Android query method that returns whether or not a particular custom
Toast has been shown. |
static boolean |
showedToast(CharSequence message)
query method that returns whether or not a particular
Toast has been shown. |
static int |
shownToastCount()
Non-Android accessor that returns the number of
Toast requests that have been made during this test run
or since reset() has been called. |
public void __constructor__(android.content.Context context)
@Implementation
public static android.widget.Toast makeText(android.content.Context context,
int resId,
int duration)
@Implementation
public static android.widget.Toast makeText(android.content.Context context,
CharSequence text,
int duration)
@Implementation public void show()
@Implementation public void setText(int resId)
@Implementation public void setText(CharSequence text)
@Implementation public void setView(android.view.View view)
@Implementation public android.view.View getView()
@Implementation
public void setGravity(int gravity,
int xOffset,
int yOffset)
@Implementation public int getGravity()
@Implementation public int getXOffset()
@Implementation public int getYOffset()
@Implementation public void setDuration(int duration)
@Implementation public int getDuration()
@Implementation public void cancel()
public static void reset()
Toastspublic static int shownToastCount()
Toast requests that have been made during this test run
or since reset() has been called.Toast requests that have been made during this test run
or since reset() has been called.public static boolean showedCustomToast(CharSequence message, int layoutResourceIdToCheckForMessage)
Toast has been shown.message - the message to search forlayoutResourceIdToCheckForMessage - the id of the resource that contains the toast messagesToast was requestedpublic static boolean showedToast(CharSequence message)
Toast has been shown.message - the message to search forToast was requestedpublic static String getTextOfLatestToast()
ToastToastpublic static android.widget.Toast getLatestToast()
ToastToastCopyright © 2015. All rights reserved.