本文介绍了可以将图形页面被放置在里面ViewFlipper不知何故?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用ViewFlipper和一个自定义库调用viewflow(见这里),所以我得到一个不错的刷卡效应(点菜主屏幕)。

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.

不过,Android似乎要求一个com.google.android.maps.MapView是由一个独立的活动的控制,更具体地,一 MapActivity 的其中弄乱的事情了。

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.

它很容易视图添加到viewflow或ViewFlipper,但我不能只是增加一个图形页面,因为我会再得到一个InflateException。我觉得InflateException是因为的MapView没有被通过MapActivity夸大,而是一种正常的活动。

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 thats another issue. Can perhaps be solved with a little space on the top or something...

任何想法?

推荐答案

是不是有可能膨胀的MapView中的FrameLayout?

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

这篇关于可以将图形页面被放置在里面ViewFlipper不知何故?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!