Hai, I am new android developer. I want to create a Tab host application . There will be 3 different tab items .Each item is attached with map view. I want to change the zoom label of each map when tab each item. How can i do it...
Asked
Active
Viewed 473 times
2 Answers
0
In each tab item , set programatically the following line with MapView:
mapView.setBuiltInZoomControls(true);
mapView.getController().setZoom(13); //set zoom level according to need for each tab item
Hope this will solve your issue.

Dinesh Sharma
- 11,533
- 7
- 42
- 60
0
Use this event
public void onTabChanged(String arg0) {
int currentTabvalue = tabHost.getCurrentTab();
if(currentTabvalue==0) mapView.getController().setZoom(----); else if(currentTabvalue==1) mapView.getController().setZoom(----); else if(currentTabvalue==2) mapView.getController().setZoom(----);
}
I thinks this is the code you want to achieve this. In this code you fill the value in the place of ----- according to your requirement. I hope you have got your answer.

DynamicMind
- 4,240
- 1
- 26
- 43