RSS

Android tab control: the old way

23 Jul

  1. Create a new android project in Eclipse
  2. Create two (as many as you like) activities in Eclipse:
    1. Right click the Package Exporer, New > Other, or press Ctrl + N;
    2. Select Android Activity, name it Tabpage1 and Tabpage2
  3. Create a new Activity as the MainActivity, make sure it extends from TabActivity, instead of Activity.
  4. In MainActivity’s onCreate() function, add below code:

    image

  5. Build and run, that is it.

2013-07-23 11.20.36

 

 
1 Comment

Posted by on July 23, 2013 in Android, Programming

 

Tags: , , , , , ,

One response to “Android tab control: the old way

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: