多个Toast同时显示时,希望同时显示在屏幕而不是依次显示,怎么办?
多个toast同时显示时,默认是toast按时间依次显示,这个效果不好。希望做一个按照位置不同,但能够同时显示在屏幕上。怎么做?
[解决办法]
if (mNextView == null) {
throw new RuntimeException("setView must have been called");
}
INotificationManager service = getService();
String pkg = mContext.getPackageName();
TN tn = mTN;
tn.mNextView = mNextView;
try {
service.enqueueToast(pkg, tn, mDuration);
} catch (RemoteException e) {
// Empty
}