public class TabItem

TabItem is a special 'view' which allows you to declare tab items for a TabLayout within a layout. This view is not actually added to TabLayout, it is just a dummy which allows setting of a tab items's text, icon and custom layout. See TabLayout for more information on how to use it.

ref com.google.android.material.R.styleable#TabItem_android_icon

ref com.google.android.material.R.styleable#TabItem_android_text

ref com.google.android.material.R.styleable#TabItem_android_layout

Summary

Public constructors

TabItem(Context context)

TabItem(Context context, AttributeSet attrs)

Public fields

icon

public final Drawable icon

Public constructors

TabItem

public TabItem(Context context)

TabItem

public TabItem(Context context, AttributeSet attrs)

Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Last updated 2025-10-28 UTC.