I have the following code:
setContentView(R.layout.maplayout);
// Create Rotate view
mRotateView = new RotateView(this);
// create a map view
mapView = (MapView) findViewById(R.id.mapview);
mRotateView.addView(mapView); // error here
setContentView(mRotateView);
mylocation = new MyLocationOverlay(this,mapView);
But when I add the view I get an error that says that the specified child already has a parent. I assume this is because the mapView is already a child of the layout.
So, how do I resolve this?