I have placed a toast inside onPause()
method in a CrimeFragment. When I press up button, through Hierarchical navigation, the parent activity’s Fragment is shown and this toast is displayed. The code for showing toast is:
Toast.makeText(getActivity(), mCrime.getDate().toString(), Toast.LENGTH_SHORT).show();
The problem is after a bit the value being shown, date in this case, in toast is changed. Can some body please tell me why??
I understand that toast is shown even though the Activity: CrimeFragmentActivity is no longer alive due to a fact that the toast has to be shown for time mentioned in Toast.LENGTH.