Android Screen orientation, shake cellphone crashes the application
I am having search application, which loads d开发者_运维知识库ata 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 ???
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);
}
精彩评论