
Why does the zoom control show like this? It only happens on QVGA resolution smulator. It works perfectly on HVGA resolution.
This is the code that I used.
ZoomControls zoomControls = (ZoomControls) findViewById(R.id.zoomcontrols);
zoomControls.setOnZoomInClickListener(new View.OnClickListener() {
public void onClick(View v) {
mc.zoomIn();
}
});
zoomControls.setOnZoomOutClickListener(new View.OnClickListener() {
public void onClick(View v) {
mc.zoomOut();
}
});
zoomcontrols defined in xml as:
<ZoomControls android:id="@+id/zoomcontrols"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"/>
Shouldn't be nothing wrong with your code. It could be a emulator bug. You should test it on a real device if you can.
It seems you are not the only one. Zoom controls on emulator running Android 1.6 with QVGA
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With