OnLoadFinished not received from LoaderManager when screen orientation changes
I have an activity with a ListView and the data for the ListView is loaded using Loaders.
I want to refresh the data whenever onResume is called so I am calling LoaderManager.initLoader(..) in onResume()
The problem is that when orientation changes (to landscape from portrait) I don't get a callback on onLoadFinished and so my UI doesn't get updated.
The funny part is that when the orientation is changed back to portrait mode it works fine.
Digging a little deeper, I found that if I merely call getLoaderManager() in onCreate() it solves the problem. But this dosen't seem right.
Can someone explain what happens when you change orientation? Has anyone faced this before?
Code snippet -> http://pastebin.com/86R1ib06
链接地址: http://www.djcxy.com/p/65358.html上一篇: 儿童活动轮换后保留旧装载机