我无法在mapview上移动缩放控制按钮

时间:2012-09-20 06:46:34

标签: android zoom android-mapview

我想将它移到mapview之上。我怎么能改变?

1 个答案:

答案 0 :(得分:1)

zoomView = (LinearLayout) mapView.getZoomControls();

zoomView.setLayoutParams(new ViewGroup.LayoutParams


(ViewGroup.LayoutParams.WRAP_CONTENT,


 ViewGroup.LayoutParams.WRAP_CONTENT)); 

zoomView.setGravity(Gravity.TOP | Gravity.CENTER_HORIZONTAL);
mapView.addView(zoomView);