Android rotation prevents from .post() or UI thread running, related to network call
问题 In my application, I cannot edit any UI elements after a screen orientation is changed. Defined in FragmentActivity: static Handler uiHandler; Runned in Fragment in separate thread: uiHandler.post(new Runnable() { public void run() { chcemhovoritback.setBackgroundColor(Color.MAGENTA); } } I have runned one post() already in application and I if I run it before orientation changed, no problem. 回答1: When orientation changes, the activity is recreated. To prevent this from happening, add the