Skip to content

Commit 8dfe598

Browse files
committed
Retain map fragment instance state
1 parent bf61f1f commit 8dfe598

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ android {
77
applicationId "org.nitri.opentopo"
88
minSdkVersion 19
99
targetSdkVersion 28
10-
versionCode 6
11-
versionName "1.2"
10+
versionCode 7
11+
versionName "1.2.1"
1212
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
1313
}
1414
buildTypes {

app/src/main/java/org/nitri/opentopo/MapFragment.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ public static MapFragment newInstance(double lat, double lon) {
119119
public void onCreate(Bundle savedInstanceState) {
120120
super.onCreate(savedInstanceState);
121121
setHasOptionsMenu(true);
122+
setRetainInstance(true);
122123
Configuration.getInstance().setUserAgentValue(BuildConfig.APPLICATION_ID);
123124
}
124125

0 commit comments

Comments
 (0)