Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: Why is the zoom control like this?

alt text

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"/>
like image 669
Rohith Nandakumar Avatar asked Nov 20 '25 05:11

Rohith Nandakumar


1 Answers

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

like image 148
Specur Avatar answered Nov 21 '25 19:11

Specur



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!