2
我試圖活性通過重寫的onPause方法與此代碼暫停之前顯示舉杯消息:如何在android中的onPause()之前顯示Toast消息?
@Override
protected void onPause() {
Toast.makeText(this, "Paused", Toast.LENGTH_LONG);
super.onPause();
}
本http://developer.android.com/reference/android/app/Activity.html#ActivityLifecycle 活動將不被暫停,直到返回此方法:
"Implementations of this method must be very quick because the next activity will not be resumed until this method returns."
然而烤麪包信息根本不顯示。
謝謝++。深夜我沒有注意到它。 –