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 开发者_JAVA百科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?
Isn't it possible to inflate the MapView in a Framelayout?
精彩评论