{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}
public class 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
to complete the initialization of the tab host.
Public constructors |
|
---|---|
This method is deprecated. Use TabLayout and ViewPager instead. |
|
This method is deprecated. Use TabLayout and ViewPager instead. |
Public methods |
|
---|---|
@NonNull void |
This method is deprecated. Use TabLayout and ViewPager instead. |
@NonNull void |
This method is deprecated. Use TabLayout and ViewPager instead. |
@NonNull void |
This method is deprecated. Use TabLayout and ViewPager instead. |
@NonNull void |
This method is deprecated. Use TabLayout and ViewPager instead. |
@NonNull void |
This method is deprecated. Use TabLayout and ViewPager instead. |
@NonNull void |
This method is deprecated. Use TabLayout and ViewPager instead. |
@NonNull
publicFragmentTabHost(@NonNull Context context, @Nullable AttributeSet attrs)
@NonNull
public voidaddTab(
@NonNull TabSpec tabSpec,
@NonNull Class<@NonNull Object> clss,
@Nullable Bundle args
)
@NonNull
public voidsetOnTabChangedListener(@Nullable OnTabChangeListener l)
@NonNull
public voidsetup(@NonNull Context context, @NonNull FragmentManager manager)
Set up the FragmentTabHost to use the given FragmentManager