Home > Mobile > How to perform onPause () before, display the toast?
How to perform onPause () before, display the toast?
Time:10-05
I want to display a toast before the activity to suspend, rewrite the onPause () method is as follows: @ Override protected void onPause () {toast. MakeText (this, "Paused", toast. LENGTH_LONG), show (); Super. OnPause (); } according to this, only when the onPause () method at the end of the activity will be suspended, at that time, toast information but did not show,
CodePudding user response:
The general and stop, your interface is not currently visible, toast did not show, you can call it log see, don't use the toast