开发者

Android Zoom Controls keep zooming in and will not stop

My zoom controls keep zooming in when I press the button, and will not stop, am I missing something?

zoomControls = (ZoomControls) findViewById(R.id.zoom);
        zoomControls.setOnZoomInClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                        mc.zoomIn();
                }
        });
        zoomControls.setOnZoomOutClickListener(new View.OnClickListener(开发者_如何学JAVA) {
                @Override
                public void onClick(View v) {
                        mc.zoomOut();
                }
        });


Taking an educated guess that mc is a MapController, perhaps calling zoomIn() on a MapController triggers the relevant OnClickListener as well. Try logging every time you are in your onClick() to see if you get a chain of log messages. If so, then you probably can't do what you're trying to do.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜