public class QuickCallout extends Callout {
private MapView _map;
public QuickCallout(MapView map) {
super(map);
// TODO Auto-generated constructor stub
_map = map;
}
@Override
public void show(Point pt) {
super.show(pt,_map);
}
}
When I tried to use this class like this:
QuickCallout callout = new QuickCallout(mMapView);
callout.setStyle(R.xml.mappop);
LayoutInflater inflater = this.getLayoutInflater();
View v = inflater.inflate(R.layout.mappopview,null);
callout.setContent(v);
callout.refresh();
callout.sohw(mypoint);
I got some error message like this:01-15 16:51:59.253: E/AndroidRuntime(8515): java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.How to resolve this problem ?