TabHost.TabSpec
public
class
TabHost.TabSpec
extends Object
java.lang.Object | |
↳ | android.widget.TabHost.TabSpec |
A tab has a tab indicator, content, and a tag that is used to keep
track of it. This builder helps choose among these options.
For the tab indicator, your choices are:
1) set a label
2) set a label and an icon
For the tab content, your choices are:
1) the id of a View
2) a TabHost.TabContentFactory
that creates the View
content.
3) an Intent
that launches an Activity
.
Summary
Public methods | |
---|---|
String
|
getTag()
Returns the tag for this tab specification. |
TabHost.TabSpec
|
setContent(Intent intent)
Specify an intent to use to launch an activity as the tab content. |
TabHost.TabSpec
|
setContent(TabHost.TabContentFactory contentFactory)
Specify a |
TabHost.TabSpec
|
setContent(int viewId)
Specify the id of the view that should be used as the content of the tab. |
TabHost.TabSpec
|
setIndicator(View view)
Specify a view as the tab indicator. |
TabHost.TabSpec
|
setIndicator(CharSequence label)
Specify a label as the tab indicator. |
TabHost.TabSpec
|
setIndicator(CharSequence label, Drawable icon)
Specify a label and icon as the tab indicator. |
Inherited methods | |
---|---|
Public methods
getTag
String getTag ()
Returns the tag for this tab specification.
Returns | |
---|---|
String |
the tag for this tab specification
This value will never be |
setContent
TabHost.TabSpec setContent (Intent intent)
Specify an intent to use to launch an activity as the tab content.
Parameters | |
---|---|
intent |
Intent |
Returns | |
---|---|
TabHost.TabSpec |
setContent
TabHost.TabSpec setContent (TabHost.TabContentFactory contentFactory)
Specify a TabHost.TabContentFactory
to use to
create the content of the tab.
Parameters | |
---|---|
contentFactory |
TabHost.TabContentFactory |
Returns | |
---|---|
TabHost.TabSpec |
setContent
TabHost.TabSpec setContent (int viewId)
Specify the id of the view that should be used as the content of the tab.
Parameters | |
---|---|
viewId |
int |
Returns | |
---|---|
TabHost.TabSpec |
setIndicator
TabHost.TabSpec setIndicator (View view)
Specify a view as the tab indicator.
Parameters | |
---|---|
view |
View |
Returns | |
---|---|
TabHost.TabSpec |
setIndicator
TabHost.TabSpec setIndicator (CharSequence label)
Specify a label as the tab indicator.
Parameters | |
---|---|
label |
CharSequence |
Returns | |
---|---|
TabHost.TabSpec |
setIndicator
TabHost.TabSpec setIndicator (CharSequence label, Drawable icon)
Specify a label and icon as the tab indicator.
Parameters | |
---|---|
label |
CharSequence |
icon |
Drawable |
Returns | |
---|---|
TabHost.TabSpec |
Annotations
Interfaces
- AbsListView.MultiChoiceModeListener
- AbsListView.OnScrollListener
- AbsListView.RecyclerListener
- AbsListView.SelectionBoundsAdjuster
- ActionMenuView.OnMenuItemClickListener
- Adapter
- AdapterView.OnItemClickListener
- AdapterView.OnItemLongClickListener
- AdapterView.OnItemSelectedListener
- Advanceable
- AutoCompleteTextView.OnDismissListener
- AutoCompleteTextView.Validator
- CalendarView.OnDateChangeListener
- Checkable
- Chronometer.OnChronometerTickListener
- CompoundButton.OnCheckedChangeListener
- DatePicker.OnDateChangedListener
- ExpandableListAdapter
- ExpandableListView.OnChildClickListener
- ExpandableListView.OnGroupClickListener
- ExpandableListView.OnGroupCollapseListener
- ExpandableListView.OnGroupExpandListener
- Filter.FilterListener
- Filterable
- FilterQueryProvider
- HeterogeneousExpandableList
- ListAdapter
- MediaController.MediaPlayerControl
- MultiAutoCompleteTextView.Tokenizer
- NumberPicker.Formatter
- NumberPicker.OnScrollListener
- NumberPicker.OnValueChangeListener
- PopupMenu.OnDismissListener
- PopupMenu.OnMenuItemClickListener
- PopupWindow.OnDismissListener
- RadioGroup.OnCheckedChangeListener
- RatingBar.OnRatingBarChangeListener
- RemoteViewsService.RemoteViewsFactory
- SearchView.OnCloseListener
- SearchView.OnQueryTextListener
- SearchView.OnSuggestionListener
- SectionIndexer
- SeekBar.OnSeekBarChangeListener
- ShareActionProvider.OnShareTargetSelectedListener
- SimpleAdapter.ViewBinder
- SimpleCursorAdapter.CursorToStringConverter
- SimpleCursorAdapter.ViewBinder
- SimpleCursorTreeAdapter.ViewBinder
- SlidingDrawer.OnDrawerCloseListener
- SlidingDrawer.OnDrawerOpenListener
- SlidingDrawer.OnDrawerScrollListener
- SpinnerAdapter
- TabHost.OnTabChangeListener
- TabHost.TabContentFactory
- TextView.OnEditorActionListener
- ThemedSpinnerAdapter
- TimePicker.OnTimeChangedListener
- Toolbar.OnMenuItemClickListener
- ViewSwitcher.ViewFactory
- WrapperListAdapter
- ZoomButtonsController.OnZoomListener
Classes
- AbsListView
- AbsListView.LayoutParams
- AbsoluteLayout
- AbsoluteLayout.LayoutParams
- AbsSeekBar
- AbsSpinner
- ActionMenuView
- ActionMenuView.LayoutParams
- AdapterView
- AdapterView.AdapterContextMenuInfo
- AdapterViewAnimator
- AdapterViewFlipper
- AlphabetIndexer
- AnalogClock
- ArrayAdapter
- AutoCompleteTextView
- BaseAdapter
- BaseExpandableListAdapter
- Button
- CalendarView
- CheckBox
- CheckedTextView
- Chronometer
- CompoundButton
- CursorAdapter
- CursorTreeAdapter
- DatePicker
- DialerFilter
- DigitalClock
- EdgeEffect
- EditText
- ExpandableListView
- ExpandableListView.ExpandableListContextMenuInfo
- Filter
- Filter.FilterResults
- FrameLayout
- FrameLayout.LayoutParams
- Gallery
- Gallery.LayoutParams
- GridLayout
- GridLayout.Alignment
- GridLayout.LayoutParams
- GridLayout.Spec
- GridView
- HeaderViewListAdapter
- HorizontalScrollView
- ImageButton
- ImageSwitcher
- ImageView
- LinearLayout
- LinearLayout.LayoutParams
- ListPopupWindow
- ListView
- ListView.FixedViewInfo
- Magnifier
- MediaController
- MultiAutoCompleteTextView
- MultiAutoCompleteTextView.CommaTokenizer
- NumberPicker
- OverScroller
- PopupMenu
- PopupWindow
- ProgressBar
- QuickContactBadge
- RadioButton
- RadioGroup
- RadioGroup.LayoutParams
- RatingBar
- RelativeLayout
- RelativeLayout.LayoutParams
- RemoteViews
- RemoteViewsService
- ResourceCursorAdapter
- ResourceCursorTreeAdapter
- Scroller
- ScrollView
- SearchView
- SeekBar
- ShareActionProvider
- SimpleAdapter
- SimpleCursorAdapter
- SimpleCursorTreeAdapter
- SimpleExpandableListAdapter
- SlidingDrawer
- Space
- Spinner
- StackView
- Switch
- TabHost
- TabHost.TabSpec
- TableLayout
- TableLayout.LayoutParams
- TableRow
- TableRow.LayoutParams
- TabWidget
- TextClock
- TextSwitcher
- TextView
- TextView.SavedState
- TimePicker
- Toast
- ToggleButton
- Toolbar
- Toolbar.LayoutParams
- TwoLineListItem
- VideoView
- ViewAnimator
- ViewFlipper
- ViewSwitcher
- ZoomButton
- ZoomButtonsController
- ZoomControls
Enums
Exceptions