I've been just looking at the demo and code for the ViewPager class in the android compatibility library; http://developer.android.com/resources/samples/Support4Demos/src/com/example/android/supportv4/app/index.html
What I want to create is;
- A TabHost with tabs.
- Each tab displays a List.
- When an item in the List is selected it starts a new Activity.
- The new Activity slides in to the space that the List was in, so the tabs are still visible.
- Pressing the back button removes the new Activity and displays the original List.
I read about using an ActivityGroup but that class is deprecated so I refuse to use it. I've looked at the Fragement demo examples for ViewPager and TabHost and feel like I'm looking for a combination of both of those things, but I'm a bit stuck on if it's开发者_StackOverflow中文版 even possible to do?
Thanks!
I've found a way to do this using ViewFlipper inside a tab. Then using custom in and out animations to slide between views.
精彩评论