Added in API level 1
Deprecated in API level 30

TabSpec

open class TabSpec
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

Returns the tag for this tab specification.

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!

Specify a android.widget.TabHost.TabContentFactory to use to create the content of the tab.

open TabHost.TabSpec!
setContent(intent: Intent!)

Specify an intent to use to launch an activity as the tab content.

open TabHost.TabSpec!

Specify a label as the tab indicator.

open TabHost.TabSpec!

Specify a label and icon as the tab indicator.

open TabHost.TabSpec!

Specify a view as the tab indicator.

Public methods

getTag

Added in API level 4
Deprecated in API level 30
open fun getTag(): 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

Added in API level 1
open fun setContent(viewId: Int): TabHost.TabSpec!

Deprecated: Deprecated in Java.

Specify the id of the view that should be used as the content of the tab.

setContent

Added in API level 1
open fun setContent(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

Added in API level 1
open fun setContent(intent: Intent!): TabHost.TabSpec!

Deprecated: Deprecated in Java.

Specify an intent to use to launch an activity as the tab content.

setIndicator

Added in API level 1
open fun setIndicator(label: CharSequence!): TabHost.TabSpec!

Deprecated: Deprecated in Java.

Specify a label as the tab indicator.

setIndicator

Added in API level 1
open fun setIndicator(
    label: CharSequence!,
    icon: Drawable!
): TabHost.TabSpec!

Deprecated: Deprecated in Java.

Specify a label and icon as the tab indicator.

setIndicator

Added in API level 4
Deprecated in API level 30
open fun setIndicator(view: View!): TabHost.TabSpec!

Deprecated: Deprecated in Java.

Specify a view as the tab indicator.