Hi I am working on my first android app and so my first with the Maps
API and am experiencing an odd problem.
I have a mapview with the property clickable set to true:
<com.google.android.maps.MapView
android:id="@+id/mapview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:clickable="true"
android:apiKey="MY_DEBUG_KEY"
/>
I have registered for the click event:
mapView = (MapView) findViewById(R.id.mapview);
mapView.setBuiltInZoomControls(true);
mapView.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// onClick Code.
}
});
How ever when I click the screen it seems the onClick event is not
being run? Have I missed something or am I better off sub classing
the MyLocationOverlay I am using and override DispatchTap()? How ever
i would rather be able to just click anywhere on the map to dispatch
the event.
--
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