public class Toast extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
LENGTH_LONG |
static int |
LENGTH_SHORT |
| Modifier and Type | Method and Description |
|---|---|
void |
cancel() |
int |
getDuration() |
int |
getGravity() |
float |
getHorizontalMargin() |
float |
getVerticalMargin() |
View |
getView() |
int |
getXOffset() |
int |
getYOffset() |
static Toast |
makeText(Context context,
CharSequence text,
int duration) |
static Toast |
makeText(Context context,
int resId,
int duration) |
void |
setDuration(int duration) |
void |
setGravity(int gravity,
int xOffset,
int yOffset) |
void |
setMargin(float horizontalMargin,
float verticalMargin) |
void |
setText(CharSequence s) |
void |
setText(int resId) |
void |
setView(View view) |
void |
show() |
public static final int LENGTH_SHORT
public static final int LENGTH_LONG
public Toast(Context context)
public void show()
public void cancel()
public void setView(View view)
public View getView()
public void setDuration(int duration)
public int getDuration()
public void setMargin(float horizontalMargin,
float verticalMargin)
public float getHorizontalMargin()
public float getVerticalMargin()
public void setGravity(int gravity,
int xOffset,
int yOffset)
public int getGravity()
public int getXOffset()
public int getYOffset()
public static Toast makeText(Context context, CharSequence text, int duration)
public static Toast makeText(Context context, int resId, int duration) throws Resources.NotFoundException
Resources.NotFoundExceptionpublic void setText(int resId)
public void setText(CharSequence s)
Copyright © 2008-2013. All Rights Reserved.