diff --git a/platform/android/MapLibreAndroidTestApp/src/main/AndroidManifest.xml b/platform/android/MapLibreAndroidTestApp/src/main/AndroidManifest.xml
index 0a27a1cc3..07215347b 100644
--- a/platform/android/MapLibreAndroidTestApp/src/main/AndroidManifest.xml
+++ b/platform/android/MapLibreAndroidTestApp/src/main/AndroidManifest.xml
@@ -976,6 +976,18 @@
android:name="android.support.PARENT_ACTIVITY"
android:value=".activity.FeatureOverviewActivity" />
+
+
+
+
(R.id.fabResize)
+ fabDebug.setOnClickListener { view: View? ->
+ if (this::mapView.isInitialized) {
+ val parent = findViewById(R.id.coordinator_layout)
+ val width = if (parent.width == mapView.width) parent.width / 2 else parent.width
+ val height =
+ if (parent.height == mapView.height) parent.height / 2 else parent.height
+ mapView.layoutParams = CoordinatorLayout.LayoutParams(width, height)
+ }
+ }
+ }
+
+ override fun onStart() {
+ super.onStart()
+ mapView.onStart()
+ }
+
+ override fun onResume() {
+ super.onResume()
+ mapView.onResume()
+ }
+
+ override fun onPause() {
+ super.onPause()
+ mapView.onPause()
+ }
+
+ override fun onStop() {
+ super.onStop()
+ mapView.onStop()
+ }
+
+ override fun onSaveInstanceState(outState: Bundle) {
+ super.onSaveInstanceState(outState)
+ mapView.onSaveInstanceState(outState)
+ }
+
+ override fun onDestroy() {
+ super.onDestroy()
+ mapView.onDestroy()
+ }
+
+ override fun onLowMemory() {
+ super.onLowMemory()
+ mapView.onLowMemory()
+ }
+}
diff --git a/platform/android/MapLibreAndroidTestApp/src/main/res/layout/activity_surfaceview_resize.xml b/platform/android/MapLibreAndroidTestApp/src/main/res/layout/activity_surfaceview_resize.xml
new file mode 100644
index 000000000..9731cbf45
--- /dev/null
+++ b/platform/android/MapLibreAndroidTestApp/src/main/res/layout/activity_surfaceview_resize.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
diff --git a/platform/android/MapLibreAndroidTestApp/src/main/res/values/categories.xml b/platform/android/MapLibreAndroidTestApp/src/main/res/values/categories.xml
index c5a358801..4737da967 100644
--- a/platform/android/MapLibreAndroidTestApp/src/main/res/values/categories.xml
+++ b/platform/android/MapLibreAndroidTestApp/src/main/res/values/categories.xml
@@ -15,6 +15,7 @@
Storage
Events
Texture View
+ Surface View
Location
_Integration
Turf
diff --git a/platform/android/MapLibreAndroidTestApp/src/main/res/values/descriptions.xml b/platform/android/MapLibreAndroidTestApp/src/main/res/values/descriptions.xml
index 20de4e209..6e15c6932 100644
--- a/platform/android/MapLibreAndroidTestApp/src/main/res/values/descriptions.xml
+++ b/platform/android/MapLibreAndroidTestApp/src/main/res/values/descriptions.xml
@@ -78,6 +78,7 @@
Resize a map rendered on a TextureView
Animate a map rendered on a TextureView
Enable a transparent surface on TextureView
+ Resize a map rendered on a SurfaceView
Blend an overlay on a map
Example Custom Geometry Source
Load a map without providing a style URI or JSON
diff --git a/platform/android/MapLibreAndroidTestApp/src/main/res/values/titles.xml b/platform/android/MapLibreAndroidTestApp/src/main/res/values/titles.xml
index 9649a9852..6c35c3e03 100644
--- a/platform/android/MapLibreAndroidTestApp/src/main/res/values/titles.xml
+++ b/platform/android/MapLibreAndroidTestApp/src/main/res/values/titles.xml
@@ -74,6 +74,7 @@
TextureView resize
TextureView animation
TextureView transparent background
+ SurfaceView resize
Map overlay
Grid Source
No Style URI/JSON