Added in API level 1
Deprecated in API level 30

TabHost


open class TabHost : FrameLayout, ViewTreeObserver.OnTouchModeChangeListener
kotlin.Any
   ↳ android.view.View
   ↳ android.view.ViewGroup
   ↳ android.widget.FrameLayout
   ↳ android.widget.TabHost

Container for a tabbed window view. This object holds two children: a set of tab labels that the user clicks to select a specific tab, and a FrameLayout object that displays the contents of that page. The individual elements are typically controlled using this container object, rather than setting values on the child elements themselves.

Summary

Nested classes
abstract

Interface definition for a callback to be invoked when tab changed

abstract

Makes the content of a tab when it is selected.

open

A tab has a tab indicator, content, and a tag that is used to keep track of it.

Inherited XML attributes
Inherited constants
Public constructors
TabHost(context: Context!)

TabHost(context: Context!, attrs: AttributeSet!)

TabHost(context: Context!, attrs: AttributeSet!, defStyleAttr: Int)

TabHost(context: Context!, attrs: AttributeSet!, defStyleAttr: Int, defStyleRes: Int)

Public methods
open Unit

Add a tab.

open Unit

Removes all tabs from the tab widget associated with this tab host.

open Boolean

open Unit

open CharSequence!

open Int

Returns the current tab.

open String?

Returns the tag for the current tab.

open View?

Returns the view for the current tab.

open View!

open FrameLayout!

Get the FrameLayout which holds tab content

open TabWidget!

open TabHost.TabSpec

Creates a new TabSpec associated with this tab host.

open Unit
onTouchModeChanged(isInTouchMode: Boolean)

open Unit

open Unit

Sets the current tab based on its tag.

open Unit

Register a callback to be invoked when the selected state of any of the items in this list changes

open Unit

Call setup() before adding tabs if loading TabHost using findViewById().

open Unit
setup(activityGroup: LocalActivityManager!)

If you are using TabSpec.setContent(android.content.Intent), this must be called since the activityGroup is needed to launch the local activity.

Inherited functions