TabView with ACtionBar

北慕城南 提交于 2019-12-25 03:58:18

问题


I am using tabview in my application, in which Home is default tab selected

I add three Buttons over this activity.I want that when i click on List button of MapView Activity, this

MapPinsListView Activity will start on the same frame over MapView & rest view will remains same i.e., all tabs will works as they intended to work. However, i am facing a problem while using it, When i click on list, intent will start new activity & hole view get replaced by its activiy view, whereas i want only the frame view will change by the view of called intent & when click on Map button of MapPinsListView, MapView will start. How should i proceed.

Would appreciate your help a lot!

Thanks


回答1:


after having a long R&D i got the best way to do this is

1.code TabGroupActivity which extends ActivityGroup.The purpose of this Activity is to manage the activities in a tab. Note that Child Activities can handle Key Presses before they are seen here.

2.code different classes (e.g., TabGroupHome, TabGroupFavourite, TabGroupMassage & so on...) & extends TabGroupActivity.

3.finally code TabActivity which extends TabActivity & then add these TabGroupActivities(TabGroupHome, Favourite, Massage, Profile, Settings) ovew there respactive tabSpace.

finally, after completing these all different activities get managed over the same fram! http://ericharlow.blogspot.com/2010/09/experience-multiple-android-activities.html



来源:https://stackoverflow.com/questions/8244210/tabview-with-actionbar

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!