activity-lifecycle

How to handle Activity when Orientation changes ?

I am writing an activity, that loads data from a server and displays it as a list using ArrayAdapter. For that I'm showing a progress dialog i.e loading, while it loads all data from the server. Then i dismiss the dialog in a handler. My problem is that when ever i change the orientation, the progress dialog is again shown, which is not ...

Why change ListView cursor to null on stop?

I've been looking at examples of CursorAdapter implementations to make sure I'm doing everything right. One thing I've noticed that I'm not doing is calling changeCursor(null) on my CursorAdapter in the Activity's onStop() handler. mAdapter.changeCursor(null); What is the purpose of this? I'm willing to do it if there's a good reaso...