Quantcast
Channel: Programming – Xinyustudio
Viewing all articles
Browse latest Browse all 284

Android tab control: the old way

$
0
0
  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

 


Filed under: Android, Programming Tagged: android, eclipse, example, tab, tabbed interface, tutorial, UI

Viewing all articles
Browse latest Browse all 284

Trending Articles