diff --git a/MapboxAndroidDemo/src/main/AndroidManifest.xml b/MapboxAndroidDemo/src/main/AndroidManifest.xml index 2fef25cf5..fee0e44d1 100644 --- a/MapboxAndroidDemo/src/main/AndroidManifest.xml +++ b/MapboxAndroidDemo/src/main/AndroidManifest.xml @@ -428,7 +428,8 @@ + android:label="@string/activity_styles_transparent_background_title" + android:screenOrientation="portrait"> diff --git a/MapboxAndroidDemo/src/main/java/com/mapbox/mapboxandroiddemo/examples/styles/TransparentBackgroundActivity.java b/MapboxAndroidDemo/src/main/java/com/mapbox/mapboxandroiddemo/examples/styles/TransparentBackgroundActivity.java index 3772beac2..1680ee7d2 100644 --- a/MapboxAndroidDemo/src/main/java/com/mapbox/mapboxandroiddemo/examples/styles/TransparentBackgroundActivity.java +++ b/MapboxAndroidDemo/src/main/java/com/mapbox/mapboxandroiddemo/examples/styles/TransparentBackgroundActivity.java @@ -26,7 +26,8 @@ import timber.log.Timber; /** - * Create a transparent render surface and add whatever you want. This example has a moving water. + * Create a transparent render surface and add whatever you want to the background. This example + * has a video of moving water behind Earth's land. */ public class TransparentBackgroundActivity extends AppCompatActivity implements OnMapReadyCallback { @@ -106,11 +107,11 @@ public void onLowMemory() { @Override protected void onDestroy() { - super.onDestroy(); - mapView.onDestroy(); - if(null!=backgroundWaterVideoView){ + if (backgroundWaterVideoView != null) { backgroundWaterVideoView.stopPlayback(); } + super.onDestroy(); + mapView.onDestroy(); } @Override @@ -119,6 +120,9 @@ protected void onSaveInstanceState(Bundle outState) { mapView.onSaveInstanceState(outState); } + /** + * Get the map style JSON from the raw file in the app's raw folder + */ public static String readRawResource(Context context, @RawRes int rawResource) throws IOException { String json = ""; if (context != null) {