My problem is this:
I have 3 tabs, each with an assigned activity. From one of those activities, I want to launch a second activity in the first activity's view (thereby keeping the tabview visible).
So far, I have tried a few approaches:
1 - adding an intent to the first activity's class and then calling startActivityForRes开发者_JAVA技巧ult(). This results in the tabview being lost and the second activity covering the screen.
2 - Using a ViewFlipper and adding the second activity as the flipped view.
If anyone can give any sort of direction on where I should be looking I will be extremely pleased :)
Thanks
John all you are looking for is ActivityGroup here are the links that may prove useful to you
http://blog.henriklarsentoft.com/2010/07/android-tabactivity-nested-activities
http://ericharlow.blogspot.com/2010/09/experience-multiple-android-activities.html
Use THis to start the new Activity
View view = getLocalActivityManager().startActivity("tab1", new Intent(this,tab1.class) .addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)) .getDecorView();
setContentView(view);
精彩评论