3

official android dev website says that:「You can implement your tab content in one of two ways: use the tabs to swap Views within the same Activity,.....」

http://developer.android.com/resources/tutorials/views/hello-tabwidget.html

i just wanna use tabs to swap views, no more than one activity.

could someone teach me how to do that?? is there any sample code?? thx ~

peterlawn
  • 2,371
  • 6
  • 25
  • 44

2 Answers2

3

I had a similar question awhile ago about this. Check out the responses. One includes a rather detailed tutorial.

Community
  • 1
  • 1
I82Much
  • 26,901
  • 13
  • 88
  • 119
0

i've found this , http://www.netmite.com/android/mydroid/1.6/out/target/common/docs/offline-sdk/guide/tutorials/views/hello-tabwidget.html

this is a official example code , using one activity with 3 tabs~

peterlawn
  • 2,371
  • 6
  • 25
  • 44