Skip to content

Commit

Permalink
Use MapView as parent for InfoWindow
Browse files Browse the repository at this point in the history
See comment in mapbox#894
  • Loading branch information
Leith Bade committed Sep 8, 2015
1 parent f29735a commit 91d9231
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit 91d9231

Please sign in to comment.