0

This is primarily a design question. I've implemented SimpleOnGestureListener on an ItemizedOverlay because I wanted to catch the onLongPress event as well as the onDown and onTap events. Everything is working okay but now I need to transition to a new activity on a specific onLongPress event. In this particular case an alert dialog is insufficient for my needs. Problem is transitioning from the overlay to an activity and back to the overlay. Usually, its from one activity to another and maybe back again. In addition, the code in my overlay class is getting quite long (about 450 lines) so it needs refactored and a bit more SRP. I can't see any way to attach the SimpleOnGestureListener to the Overlay from within the activity which references it, nor the MapView. Most examples I've looked at are noddy 'make a Toast' examples.

John J Smith
  • 11,435
  • 9
  • 53
  • 72

1 Answers1

0

I'm not quite sure if I getting your question right, but you can have inter-view transition, e.g. with ViewFlipper or FrameLayout with a fling detector.

You can look how the stock calculator manage its transition.

Endian Ogino
  • 146
  • 3
  • Thanks for the comment Endian. It wasn't so much a transition or animation I was looking at, it was more to do with code bloat in my ItemizedOverlay. My subsequent refactoring has reduced my code in this class to 280 lines and I can now manage what I wanted to do on the longPress using a Dialog, so I don't need to transition to another Activity and then back to the MapView. – John J Smith Jan 05 '11 at 14:04