Hi,
Iam able to add the MapView dynamically. Here's the code snippet:
Java Code:
map = new MapView(this);
((LinearLayout)findViewById(R.id.contentLayout)).addView(map, 0,new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
map.setExtent(new Envelope(-19332033.11, -3516.27, -1720941.80, 11737211.28));
XML:
<LinearLayout
android:id="@+id/contentLayout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" />
Do let me know if you meant something else.
Thanks,
V. Sriram