summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobrun <tobrun.van.nuland@gmail.com>2018-09-25 10:52:19 +0200
committerTobrun <tobrun@mapbox.com>2018-09-25 14:53:30 +0200
commitf3164d0894013bb88cd815ae1e23f9023df0022b (patch)
tree8f88e1f550d819557f203e900204f7d6fe94eeab
parent5327a0b84fe39bcd7ada8972de9700ec7fd2c493 (diff)
downloadqtlocation-mapboxgl-f3164d0894013bb88cd815ae1e23f9023df0022b.tar.gz
[android] - test app activity leak fix for BottomSheetActivity
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/maplayout/BottomSheetActivity.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/maplayout/BottomSheetActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/maplayout/BottomSheetActivity.java
index a165d9ab9d..b1b4ad183d 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/maplayout/BottomSheetActivity.java
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/maplayout/BottomSheetActivity.java
@@ -33,7 +33,7 @@ public class BottomSheetActivity extends AppCompatActivity {
private static final String TAG_MAIN_FRAGMENT = "com.mapbox.mapboxsdk.fragment.tag.main";
private static final String TAG_BOTTOM_FRAGMENT = "com.mapbox.mapboxsdk.fragment.tag.bottom";
-
+ private static final String AMOUNT_OF_MAIN_MAP_FRAGMENTS = "Amount of main map fragments: %s";
private boolean bottomSheetFragmentAdded;
@Override
@@ -88,7 +88,10 @@ public class BottomSheetActivity extends AppCompatActivity {
}
fragmentTransaction.addToBackStack(String.valueOf(mainMapFragment.hashCode()));
fragmentTransaction.commit();
- Toast.makeText(this, "Amount of main map fragments: " + (fragmentCount + 1), Toast.LENGTH_SHORT).show();
+ Toast.makeText(getApplicationContext(),
+ String.format(AMOUNT_OF_MAIN_MAP_FRAGMENTS, (fragmentCount + 1)),
+ Toast.LENGTH_SHORT
+ ).show();
}
private void toggleBottomSheetMapFragment() {