• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Creating Tabs and adding items

 
Robert Darling
Ranch Hand
Posts: 100
Android Eclipse IDE Firefox Browser
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am new to Android. Could anyone provide me some code to add tabs to a activity and then add items to the tabs using java. No XML Please.

Kind Regards.

 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tabs -which take up permanent precious screen real estate- are not much used on phones. Would using a menu work?
 
Robert Darling
Ranch Hand
Posts: 100
Android Eclipse IDE Firefox Browser
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am new to Android and just wish to consider to learn about UI components. You could do me a favor by given an example of both tabs and menus.

Kind Regards.
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Android's built-in menu facility is explained on the page I linked to.
 
Monu Tripathi
Rancher
Posts: 1369
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is a TabActivity and TabWidget that you can use. Refer this tutorial on official site for starters.
 
Monu Tripathi
Rancher
Posts: 1369
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sajjad Dar wrote:I am new to Android and just wish to consider to learn about UI components. You could do me a favor by given an example of both tabs and menus.

Kind Regards.

Android SDK comes with APIDemos package(java code + apk) and bundled with it are some very basic examples that demonstrate different UI components, patterns etc. Make sure you take a look.
 
Robert Darling
Ranch Hand
Posts: 100
Android Eclipse IDE Firefox Browser
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much. This is a great help.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic