tab and get picture name

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

tab and get picture name

Postby sojo » Mon May 04, 2009 3:15 pm

Hi,
I want to ask two questions:
1- How to create three tabs:
first tab contain: two spinner and button.
second tab contain: spinner and button.
third tab contain: spinner and button.

2- if I use ImageSwitcher to display a collection of pictures , how to get the name of the selected picture?

thanks.
sojo
Developer
Developer
 
Posts: 35
Joined: Sat Apr 25, 2009 2:06 am

Top

Tab

Postby satishkumar_lskin » Tue May 05, 2009 6:45 am

Hi,
For tab creation, refer to classes TabActivity , TabHost , TabWidget . There are three ways to specify tab content : through TabContentFactory, intents, view ids. Example could be :
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.         TabHost.TabSpec tabSpec = tabHost.newTabSpec(tag);
  2.  
  3.         tabSpec.setIndicator("tab2");
  4.  
  5.         tabSpec.setContent(viewId);
  6.  
  7.         tabHost.addTab(tabSpec);
Parsed in 0.029 seconds, using GeSHi 1.0.8.4


Thanks
Satish
satishkumar_lskin
Developer
Developer
 
Posts: 32
Joined: Mon Oct 20, 2008 8:15 am
Location: Coimbatore , TamilNadu, India

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 3 guests