------ Solution ---------------------------------------- ----
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
}
see the name to know the toast is put into a queue, which shows
write their own window , right
------ For reference only ------------------------------ ---------
floor himself stood
------ For reference only --------------------- ------------------
Toast toast =
Toast.makeText(this, "toast content here", Toast.LENGTH_SHORT);
// or something alike
toast.setGravity(Gravity.TOP | Gravity.CENTER, 80, 80);
toast.show();
------ For reference only -------------- -------------------------
I say also shows ah , pro, at least two toast.
------ For reference only --------------------- ------------------
I have encountered this problem, seeking answers
没有评论:
发表评论