OpenDelta: Refresh progress bar on orientation change
This commit is contained in:
parent
67f45dea51
commit
4cb95a5d9a
|
@ -41,6 +41,7 @@
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name="eu.chainfire.opendelta.MainActivity"
|
android:name="eu.chainfire.opendelta.MainActivity"
|
||||||
|
android:configChanges="orientation"
|
||||||
android:label="@string/title"
|
android:label="@string/title"
|
||||||
android:launchMode="singleInstance"
|
android:launchMode="singleInstance"
|
||||||
android:theme="@style/Theme.OpenDelta" >
|
android:theme="@style/Theme.OpenDelta" >
|
||||||
|
|
|
@ -39,6 +39,7 @@ import android.content.IntentFilter;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
import android.content.pm.PackageManager.NameNotFoundException;
|
import android.content.pm.PackageManager.NameNotFoundException;
|
||||||
|
import android.content.res.Configuration;
|
||||||
import android.database.Cursor;
|
import android.database.Cursor;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
@ -535,6 +536,18 @@ public class MainActivity extends Activity {
|
||||||
updateInfoVisibility();
|
updateInfoVisibility();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onConfigurationChanged(Configuration newConfig) {
|
||||||
|
super.onConfigurationChanged(newConfig);
|
||||||
|
|
||||||
|
// Called for a new screen orientation
|
||||||
|
if (newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE ||
|
||||||
|
newConfig.orientation == Configuration.ORIENTATION_PORTRAIT) {
|
||||||
|
handleProgressBar();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public void onButtonCheckNowClick(View v) {
|
public void onButtonCheckNowClick(View v) {
|
||||||
mPrefs.edit().putBoolean(SettingsActivity.PREF_START_HINT_SHOWN, true).commit();
|
mPrefs.edit().putBoolean(SettingsActivity.PREF_START_HINT_SHOWN, true).commit();
|
||||||
UpdateService.startCheck(this);
|
UpdateService.startCheck(this);
|
||||||
|
|
Loading…
Reference in New Issue