获得View的大小

在onCreate()中

		mapView.post(new Runnable(){

			public void run() {
				// 
				heightOfMapView = mapView.getHeight();
				widthOfMapView = mapView.getWidth();
				System.out.println("heightOfMapView:" + heightOfMapView + "widthOfMapView:" + widthOfMapView);
			}
			
		});
 

 

 

 

 

 

你可能感兴趣的:(view)