Skip to content Skip to sidebar Skip to footer

Android:when Run Onloadfinished In Orientation Change

I am using from AsyncLoader in my app . I want know onLoadFinished run after which method of my fragment during orientation change? I show a dialog when loader run first time @Over

Solution 1:

Based on your comment: android:when run onLoadFinished in orientation change

To not loose dialog state when screen changes the orientation you should do some staff.

First in AndroidManifest.xml you gonna set the config changes of Activity:

<activityandroid:name="my.app.pkg.MyActivity"android:configChanges="orientation|screenSize" ></activity>

After that you gonna override the onConfigurationChanged method in your Activity class to not handle anything when this happen:

@OverridepublicvoidonConfigurationChanged( final Configuration newConfig ) {
    super.onConfigurationChanged( newConfig );
}

At here your Activity will not be restarted when user rotate the device and orientation changes, and you not will lost your async staff.

Post a Comment for "Android:when Run Onloadfinished In Orientation Change"