2

I have a simple test app that uses a ViewFlipper and a custom library called viewflow (see here) so I get a nice swipe effect (a lá home screen).

Now, in one of these views I'd like to have Google Maps (or Google Navigation), so when I slide back and forth between the Views, one of them should be the Map.

However, Android seems to demand that a "com.google.android.maps.MapView" is controlled by a separate Activity, more specifically, a MapActivity which messes things up.

Its easy enough to add a View to the viewflow or ViewFlipper, but I cannot just add a MapView because I will then get an InflateException. I think the InflateException is because that the MapView isn't being inflated by a MapActivity, but rather a normal Activity.

One problem I foresee is that its hard to swipe "away" from the Map after you swiped your way to it, since swiping on the map pans the map instead. But that's another issue. Can perhaps be solved with a little space on the top or something?

halfer
  • 19,824
  • 17
  • 99
  • 186
Ted
  • 19,727
  • 35
  • 96
  • 154
  • An idea for the "swipe": only let the MapView handle scroll/drag, but not fling (fast drag/swipe). This can be done with a custom `GestureListener` – P Varga Jul 02 '12 at 12:35

1 Answers1

0

Isn't it possible to inflate the MapView in a Framelayout?

Jordi
  • 1,357
  • 12
  • 20
  • 1
    Ehm, I dont really know. And I don't see how a FrameLayout will fit in this example/scenario...? – Ted Aug 30 '11 at 17:34