I'm trying to make a mapactivity with both a mapview and a spinner. This mapactivity is inside of an activity group. When doing this
setContentView(R.layout.mpcategorychooser);
The view renders but crashes when the spinner is selected. I've looked at how to fix badtokenexceptions for spinners inside an activity group in previous questions such as this one: Error while placing a spinner inside Activity Group
But when I try using
View viewToLoad = LayoutInflater.from(this.getParent()).inflate(R.layout.main, null);
this.setContentView(viewToLoad);
I get a problem with the mapview I had in R.layout.main
07-06 16:40:38.827: ERROR/ACRA(2743): Caused by: android.view.InflateException: Binary XML file line #14: Error inflating class com.google.android.maps.MapView
I am assuming this is caused by this.getParent() not being a mapactivity? How would I fix this?