From 9a88ccaf396bbb7ed6bd6fbf05538a9cf36bf05e Mon Sep 17 00:00:00 2001 From: Leith Bade Date: Tue, 8 Sep 2015 14:01:53 +1000 Subject: [PATCH] Use MapView as parent for InfoWindow See comment in #894 --- .../main/java/com/mapbox/mapboxgl/annotations/InfoWindow.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/android/java/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxgl/annotations/InfoWindow.java b/android/java/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxgl/annotations/InfoWindow.java index c4822750138..56eae19514c 100644 --- a/android/java/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxgl/annotations/InfoWindow.java +++ b/android/java/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxgl/annotations/InfoWindow.java @@ -28,11 +28,10 @@ public class InfoWindow { public InfoWindow(int layoutResId, MapView mapView) { mMapView = mapView; mIsVisible = false; - ViewGroup parent = (ViewGroup) mapView.getParent(); Context context = mapView.getContext(); LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); - mView = inflater.inflate(layoutResId, parent, false); + mView = inflater.inflate(layoutResId, (ViewGroup) mapView, false); if (mTitleId == 0) { setResIds(mapView.getContext());