Issue
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
Solution
change
ViewGroup.LayoutParams params=new LayoutParams(500,200);
to
com.google.android.maps.MapView.LayoutParams params=new com.google.android.maps.MapView.LayoutParams(500,200);
Answered By - jeet
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.