Fragment getActivity returns null because onAttach not called yet, how to synchronize?
问题 I have a customized Fragment tabulation application. At one moment I want to open one fragment when receiving such answer from server. And then call the processResult method inside this fragment. But I got null result from getActivity which I used inside the processing. How to wait for the cycle to end to call the process method from my main? Here is the code from main: @Override public void onDeleteReservation(final SCHttpResult result, final SCWebServiceError err) { final Fragment f =