When I use MapView in place of ImageView, there is no compilation
error, but the app never launches on emulator. I followed the example
given on android developer website.
When I use ImageView, it asks me to cast the ImageView object before
getZoomControls(). But it is of no use.
Why zoomcontrols work with mapview well, but not with imageview? As
zoomcontrols, mapview and imageview all are subclasses of view, I
expected the example of mapview to work with imageview as well. Is
there anything that I am missing?
How else do I use zoomcontrols with ImageView?
Here is my code snippet:
ZoomControls mZoom;
ImageView image = (ImageView)findViewById
(R.id.img1);
LinearLayout linearLayout = (LinearLayout) findViewById
(R.id.zoomview);
mZoom = (ZoomControls)((ImageView)
image).getZoomControls();
linearLayout.addView(mZoom);
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---