When it comes to Android development, we need to place the zoomcontroller of the map in the lower-right corner of the map.
By default, when we drag a control into editor in Eclipse, the position of the control is located in the upper-left corner of the entire screen. You can use the android:layout_gravity, android:gravity, and android:width three property values to implement the control's nine-sudoku positioning.
XML code
Copy Code code as follows:
< Zoomcontrols android:id= "@+id/zoomcontroller"
android:layout_gravity= "Bottom" android:gravity= "right"
Android:layout_width= "Fill_parent" android:layout_height= "wrap_content" ></zoomcontrols >
< Zoomcontrols android:id= "@+id/zoomcontroller"
android:layout_gravity= "Bottom" android:gravity= "right"
Android:layout_width= "Fill_parent" android:layout_height= "wrap_content" ></zoomcontrols >
The code above implements placing the control in the lower-right corner. So how do you put the controls in the middle? You only need to change the value of the android:gravity to center.