TabSpec
open classTabSpec
kotlin.Any | |
↳ | 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 TabContentFactory
that creates the View
content. 3) an Intent
that launches an android.app.Activity
.
Summary
Public methods | |
---|---|
open String |
getTag() Returns the tag for this tab specification. |
open TabHost.TabSpec! |
setContent(intent: Intent!) Specify an intent to use to launch an activity as the tab content. |
open TabHost.TabSpec! |
setContent(contentFactory: TabHost.TabContentFactory!) Specify a |
open TabHost.TabSpec! |
setContent(viewId: Int) Specify the id of the view that should be used as the content of the tab. |
open TabHost.TabSpec! |
setIndicator(view: View!) Specify a view as the tab indicator. |
open TabHost.TabSpec! |
setIndicator(label: CharSequence!) Specify a label as the tab indicator. |
open TabHost.TabSpec! |
setIndicator(label: CharSequence!, icon: Drawable!) Specify a label and icon as the tab indicator. |
Public methods
getTag
open fungetTag(): String
Deprecated: Deprecated in Java.
Returns the tag for this tab specification.
Return | |
---|---|
String |
the tag for this tab specification This value cannot be null . |
setContent
open funsetContent(intent: Intent!): TabHost.TabSpec!
Deprecated: Deprecated in Java.
Specify an intent to use to launch an activity as the tab content.
setContent
open funsetContent(contentFactory: TabHost.TabContentFactory!): TabHost.TabSpec!
Deprecated: Deprecated in Java.
Specify a android.widget.TabHost.TabContentFactory
to use to create the content of the tab.
setContent
open funsetContent(viewId: Int): TabHost.TabSpec!
Deprecated: Deprecated in Java.
Specify the id of the view that should be used as the content of the tab.
setIndicator
open funsetIndicator(view: View!): TabHost.TabSpec!
Deprecated: Deprecated in Java.
Specify a view as the tab indicator.
setIndicator
open funsetIndicator(label: CharSequence!): TabHost.TabSpec!
Deprecated: Deprecated in Java.
Specify a label as the tab indicator.
setIndicator
open funsetIndicator(
label: CharSequence!,
icon: Drawable!
): TabHost.TabSpec!
Deprecated: Deprecated in Java.
Specify a label and icon as the tab indicator.