Retain context menues and dialogs on rotation

This commit is contained in:
Martin Fietz 2016-06-20 16:30:18 +02:00
parent b7dfea13b0
commit a7a9a11f7b
2 changed files with 8 additions and 6 deletions

View File

@ -43,7 +43,7 @@
<activity
android:name=".activity.MainActivity"
android:configChanges="keyboardHidden|orientation"
android:configChanges="keyboardHidden|orientation|screenSize"
android:launchMode="singleTask"
android:label="@string/app_name">
<intent-filter>
@ -81,7 +81,7 @@
<activity
android:name=".activity.PreferenceActivityGingerbread"
android:configChanges="keyboardHidden|orientation"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="@string/settings_label">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
@ -90,7 +90,7 @@
<activity
android:name=".activity.PreferenceActivity"
android:configChanges="keyboardHidden|orientation"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="@string/settings_label">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
@ -146,6 +146,7 @@
</activity>
<activity
android:name=".activity.AboutActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="@string/about_pref">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
@ -160,12 +161,12 @@
</activity>
<activity
android:name=".activity.OpmlImportFromPathActivity"
android:configChanges="keyboardHidden|orientation"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="@string/opml_import_label">
</activity>
<activity
android:name=".activity.OpmlImportFromIntentActivity"
android:configChanges="keyboardHidden|orientation"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="@string/opml_import_label">
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
@ -217,7 +218,7 @@
<activity
android:name=".activity.OnlineFeedViewActivity"
android:configChanges="orientation"
android:configChanges="orientation|screenSize"
android:label="@string/add_feed_label">
<meta-data
android:name="android.support.PARENT_ACTIVITY"

View File

@ -103,6 +103,7 @@ public class PreferenceActivity extends AppCompatActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setRetainInstance(true);
addPreferencesFromResource(R.xml.preferences);
PreferenceActivity activity = instance.get();
if(activity != null && activity.preferenceController != null) {