FragmentTabHost
open classFragmentTabHost: TabHost, OnTabChangeListener
kotlin.Any | |||||
↳ | android.view.View | ||||
↳ | android.view.ViewGroup | ||||
↳ | android.widget.FrameLayout | ||||
↳ | android.widget.TabHost | ||||
↳ | androidx.fragment.app.FragmentTabHost |
Special TabHost that allows the use of Fragment
objects for its tab content. When placing this in a view hierarchy, after inflating the hierarchy you must call setup(Context, FragmentManager, int)
to complete the initialization of the tab host.
Summary
Public constructors | |
---|---|
<init>(@NonNull context: Context, @Nullable attrs: AttributeSet?) |
Public methods | |
---|---|
open Unit | |
open Unit |
onTabChanged(@Nullable tabId: String?) |
open Unit |
setOnTabChangedListener(@Nullable l: OnTabChangeListener?) |
open Unit |
setup() |
open Unit |
setup(@NonNull context: Context, @NonNull manager: FragmentManager) Set up the FragmentTabHost to use the given FragmentManager |
open Unit |
setup(@NonNull context: Context, @NonNull manager: FragmentManager, containerId: Int) Set up the FragmentTabHost to use the given FragmentManager |
Protected methods | |
---|---|
open Unit | |
open Unit | |
open Unit |
onRestoreInstanceState(state: Parcelable!) |
open Parcelable |
Public constructors
<init>
FragmentTabHost(
@NonNull context: Context,
@Nullable attrs: AttributeSet?)
Deprecated: Use TabLayout and ViewPager instead.
Public methods
addTab
open funaddTab(
@NonNull tabSpec: TabSpec,
@NonNull clss: Class<*>,
@Nullable args: Bundle?
): Unit
Deprecated: Use TabLayout and ViewPager instead.
onTabChanged
open funonTabChanged(@Nullable tabId: String?): Unit
Deprecated: Use TabLayout and ViewPager instead.
setOnTabChangedListener
open funsetOnTabChangedListener(@Nullable l: OnTabChangeListener?): Unit
Deprecated: Use TabLayout and ViewPager instead.
setup
open funsetup(
@NonNull context: Context,
@NonNull manager: FragmentManager
): Unit
Deprecated: Use TabLayout and ViewPager instead.
Set up the FragmentTabHost to use the given FragmentManager
setup
open funsetup(
@NonNull context: Context,
@NonNull manager: FragmentManager,
containerId: Int
): Unit
Deprecated: Use TabLayout and ViewPager instead.
Set up the FragmentTabHost to use the given FragmentManager
Protected methods
onAttachedToWindow
protected open funonAttachedToWindow(): Unit
Deprecated: Use TabLayout and ViewPager instead.
onDetachedFromWindow
protected open funonDetachedFromWindow(): Unit
Deprecated: Use TabLayout and ViewPager instead.
onRestoreInstanceState
protected open funonRestoreInstanceState(state: Parcelable!): Unit
Deprecated: Use TabLayout and ViewPager instead.
onSaveInstanceState
@NonNull protected open funonSaveInstanceState(): Parcelable
Deprecated: Use TabLayout and ViewPager instead.