Added in API level 1
Deprecated in API level 30

TabWidget


open class TabWidget : LinearLayout, View.OnFocusChangeListener
kotlin.Any
   ↳ android.view.View
   ↳ android.view.ViewGroup
   ↳ android.widget.LinearLayout
   ↳ android.widget.TabWidget

Displays a list of tab labels representing each page in the parent's tab collection.

The container object for this widget is TabHost. When the user selects a tab, this object sends a message to the parent container, TabHost, to tell it to switch the displayed page. You typically won't use many methods directly on this object. The container TabHost is used to add labels, add the callback handler, and manage callbacks. You might call this object to iterate the list of tabs, or to tweak the layout of the tab list, but most methods should be called on the containing TabHost object.

Summary

XML attributes
android:divider Drawable used to draw the divider between tabs.
android:tabStripEnabled Determines whether the strip under the tab indicators is drawn or not.
android:tabStripLeft Drawable used to draw the left part of the strip underneath the tabs.
android:tabStripRight Drawable used to draw the right part of the strip underneath the tabs.
Inherited XML attributes
Inherited constants
Public constructors
TabWidget(context: Context!)

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

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

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

Public methods
open Unit
addView(child: View!)

open Unit

open Unit

open Unit

Sets the current tab and focuses the UI on it.

open CharSequence!

open View!

Returns the tab indicator view at the given index.

open Drawable?

open Drawable?

open Int

Returns the number of tab indicator views.

open Boolean

Indicates whether the bottom strips on the tab indicators are drawn or not.

open Unit
onFocusChange(v: View!, hasFocus: Boolean)

open PointerIcon!
onResolvePointerIcon(event: MotionEvent!, pointerIndex: Int)

open Unit

open Unit

Sets the current tab.

open Unit

Sets the drawable to use as a divider between the tab indicators.

open Unit

Sets the drawable to use as a divider between the tab indicators.

open Unit
setEnabled(enabled: Boolean)

open Unit

Sets the drawable to use as the left part of the strip below the tab indicators.

open Unit

Sets the drawable to use as the left part of the strip below the tab indicators.

open Unit

Sets the drawable to use as the right part of the strip below the tab indicators.

open Unit

Sets the drawable to use as the right part of the strip below the tab indicators.

open Unit
setStripEnabled(stripEnabled: Boolean)

Controls whether the bottom strips on the tab indicators are drawn or not.

Protected methods
open Int
getChildDrawingOrder(childCount: Int, i: Int)

open Unit
onSizeChanged(w: Int, h: Int, oldw: Int, oldh: Int)

Inherited functions