问题描述
我在我的应用程序中使用tabview,其中Home是默认选项卡
我在这个activity上添加了三个 Buttons
。我希望当我点击 List按钮
code> MapView Activity ,这
MapPinsListView Activity
将会在 MapView
&休息视图将保持不变,即,所有标签都将按照他们打算工作的方式工作。但是,我在使用它时遇到问题,当我点击列表时,意图将启动新的活动&孔视图被其活动视图取代,而我只希望框架视图将通过所谓的意图&当点击 MapPinsListView
地图按钮时, MapView
将会启动。我应该怎么做。
感谢您的帮助!
谢谢 $ b $我有一个很长的R& D我有最好的方式来做到这一点是
1 。代码扩展ActivityGroup的TabGroupActivity。此活动的目的是管理选项卡中的活动。请注意,儿童活动可以在看到此处之前处理按键。
2.编码不同的类(例如TabGroupHome,TabGroupFavourite,TabGroupMassage等等) &安培;扩展了TabGroupActivity。
最终代码TabActivity,它扩展了TabActivity&然后添加这些TabGroupActivities(TabGroupHome,Favorite,Massage,Profile,Settings),然后在那里重新分配tabSpace。
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
, thisMapPinsListView 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
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
这篇关于带有ACtionBar的TabView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!