LinearLayout maplayout = new LinearLayout(this);
maplayout.setGravity(Gravity.BOTTOM);
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT,600);
MapView mapView = new MapView(this,mapkey);
MapController mc = mapView.getController();
mc.setZoom(20);
maplayout.addView(mapView,params);
setContentView(maplayout);
I got a mapview with a specified location by using the above code and its run successfully but
When i swipe in map it doesnt move.. its APK level 8 project
Add this to your mapview in xml,
Or, Add this in your Java file,