How to use ActivityGroup/ViewFlipper?
In my application I want to use 4 tabs and each tab will have more than one screen. So I tried to get this and found there are two ways to do this:
- Use
ViewFlipper
insi开发者_开发问答de every tab. - Use
ActivityGroup
in tabs.
However, I'm not sure which will be efficient and easy way to do this since I'm a newbie in Android. So please help me.
Please post me some link where I can get sample code related to ActivityGroup
.
Activities are self-contained parts of your app, views are used together when they display similar type of data/behavior.
For example if your tab 1 is taking a picture and your tab 2 is showing a map and your tab 3 is sending an email then you're better of using activities as the action are completely different, with different layouts and different behaviors.
If tab 1 is a listview with an rss feed from techcrunch, tab 2 is a rss feed from StackOverFlow and tab 3 is a rss feed from bbc news then use a viewflippers : Same behavior, same actions
THis is simple to implement
Adding Activity Group will be more preffered then adding View Flipper. By this all the code and activity contents are separated and in more manageable form plus its a stable thing to use
I have the same issue but got it totaly RESOLVED Check The Following Link
http://ericharlow.blogspot.com/2010/09/experience-multiple-android-activities.html
Changing the view within the Android Tab Widget
Its The Solution For Me . Hope It will Help You as Well
精彩评论