I have a listview that has datasource getting from Network ( quite big list).
What I’m doing is provide 2 different layout for listview item ( just move some label on that list to take advantage of width of view in landscape mode).
I don’t want my activity to be reloaded when I rotate my phone, so I set in Manifest file
android:configChanges="orientation"
Next, I also implement the override method onConfigurationChanged() in my Activity to help me renew my ListAdapter with new listview item ( for landscape mode ) if it’s in Landscape (by checking newConfiguration.orientation).
I make this listadapter, call notifyDataSetChanged() and also call listview.invalidate() to re-paint the whole listview.
What I get was a big surprise: Some item are changed to new listview item( in landscape mode ) and some other listview item are not changed.
I have spent a lot of time for this and have no clue for this, please help !
Thanks in advanced.
Can you try doing whatever you are doing inside onConfigurationChanged() through a handler ?
Something like:
Here I’m guessing that you might have to wait for sometime after onConfigurationChanged to update your ListView