I try to set the width and height in java code as below:
ViewGroup.LayoutParams params=new LayoutParams(500,200);
mMapView.setLayoutParams(params);
mMapView.invalidate();
but some error occurs when execute the code:
02-02 06:04:20.126: E/AndroidRuntime(1043): java.lang.ClassCastException: android.view.ViewGroup$LayoutParams
change
to