Android: Why does zoom control look like this?

alt text

Why does zoom control look like this? This only happens on the QVGA resolution smulator. It works great with HVGA resolution.

This is the code 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();
        }
    });

zoomcontrolsdefined 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"/>
+3
source share
1 answer

There should be nothing wrong with your code. This may be an emulator error. You should check 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

+1
source

Source: https://habr.com/ru/post/1774749/


All Articles