最好的方式来实现与列表,片段和地图标签? [英] Best way to implement tabs with lists, fragments and maps?
问题描述
我想端口iOS应用程序到Android。
原来的iOS应用程序的工作流程是:
I'm trying to "port" an iOS app to Android. The original iOS app workflow is:
Tab 1
List1 -> Detail -> DetailMap
Tab 2
List2 -> Detail -> DetailMap
Tab 3
Map -> Detail
在哪里的List1和列表2是地方名单,详细信息显示有关地点的信息,DetailMap显示了地方在地图上。 地图是标志一个简单的地图,用户可以点击到达详细信息。
Where "List1" and "List2" are lists of places, "Detail" shows info about a place, "DetailMap" shows where the place is on the map. "Map" is a simple map with markers the user can click to reach "Detail".
什么是实现这个工作流程的Android的最佳方式?
What's the best way to implement this workflow in Android?
我知道我应该避免使用TabActivity(德precated),而是使用一个操作栏和片段,提供导航选项卡。
好吧,但如何实现从List1中到详细信息,并从详细信息,以DetailMap导航?我不认为这是可能有一个片段里面片段?
I know I should avoid using a TabActivity (deprecated), and instead use an action bar and fragments to provide navigation tabs. Ok, but then how to implement navigation from "List1" to "Detail", and from "Detail" to "DetailMap"? I don't think it's possible to have fragments inside a fragment?
和怎么样的地图?我不认为这是可能有一个片段里面MapView的,对吧?
And what about the maps? I don't think it's possible to have a mapview inside a fragment, right?
我必须失去了一些东西(也许很多)...
I must be missing something (maybe a lot)...
推荐答案
最好的一个组成部分。这本是ViewPager。
http://tamsler.blogspot.com/2011/10/android -viewpager和-fragments.html
One of the best components for this is the ViewPager. http://tamsler.blogspot.com/2011/10/android-viewpager-and-fragments.html
和
的http://android-developers.blogspot.com/2011/08/horizontal-view-swiping-with-viewpager.html
您可以看到它的行动在新的Android市场,或Google+应用为Android。
You can see it in action in the new Android Market, or the Google+ App for Android.
这篇关于最好的方式来实现与列表,片段和地图标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!