Question

I am having search application, which loads data retreived from the webservice.

While application on create it shows progress dialog once its done with loading data it dismiss the progress dialog.

problem is while loading if i change the orientation of the phone it works fine it try to load activity again, but if i start shaking the cellphone while it is loading data application get crashed, any solution ???

Was it helpful?

Solution

put

android:configChanges="keyboardHidden|orientation"

in you Activity xml tags.

and add these code to your activity.java

@Override
public void onConfigurationChanged(Configuration newConfig) {
    super.onConfigurationChanged(newConfig);
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top