Java android.widget TabHost fields, constructors, methods, implement or subclass

Example usage for Java android.widget TabHost fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for android.widget TabHost.

The text is from its open source code.

Subclass

android.widget.TabHost has subclasses.
Click this link to see all its subclasses.

Method

voidaddTab(TabSpec tabSpec)
Add a tab.
ViewgetChildAt(int index)
Returns the view at the specified position in the group.
ContextgetContext()
Returns the context the view is running in, through which it can access the current theme, resources, etc.
intgetCurrentTab()
Returns the current tab.
ViewgetCurrentView()
FrameLayoutgetTabContentView()
Get the FrameLayout which holds tab content
TabWidgetgetTabWidget()
TabSpecnewTabSpec(@NonNull String tag)
Creates a new TabSpec associated with this tab host.
voidsetBackgroundColor(@ColorInt int color)
Sets the background color for this view.
voidsetCurrentTab(int index)
voidsetCurrentTabByTag(String tag)
Sets the current tab based on its tag.
voidsetLayoutParams(ViewGroup.LayoutParams params)
Set the layout parameters associated with this view.
voidsetOnTabChangedListener(OnTabChangeListener l)
Register a callback to be invoked when the selected state of any of the items in this list changes
voidsetup()

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

voidsetVisibility(@Visibility int visibility)
Set the visibility state of this view.