public final class ToastUtils
extends java.lang.Object
date: 2019/8/6 20:19 author: zengfansheng
| 构造器和说明 |
|---|
ToastUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
cancel() |
static void |
reset() |
static void |
setGravity(int gravity,
int xOffset,
int yOffset)
Set the location at which the notification should appear on the screen.
|
static void |
setMargin(float horizontalMargin,
float verticalMargin)
Set the margins of the view.
|
static void |
setView(android.view.View view)
Set the view to show.
|
static void |
showLong() |
static void |
showLong(java.lang.CharSequence text) |
static void |
showLong(int resId) |
static void |
showShort() |
static void |
showShort(java.lang.CharSequence text) |
static void |
showShort(int resId) |
public static void reset()
public static void cancel()
public static void setMargin(float horizontalMargin,
float verticalMargin)
horizontalMargin - The horizontal margin, in percentage of the
container width, between the container's edges and the
notificationverticalMargin - The vertical margin, in percentage of the
container height, between the container's edges and the
notificationpublic static void setGravity(int gravity,
int xOffset,
int yOffset)
Gravity,
Toast.getGravity()public static void setView(android.view.View view)
public static void showShort()
public static void showShort(java.lang.CharSequence text)
public static void showShort(int resId)
public static void showLong()
public static void showLong(java.lang.CharSequence text)
public static void showLong(int resId)