setCustomView

@CanIgnoreReturnValue
open fun setCustomView(@LayoutRes resId: Int): TabLayout.Tab

Set a custom view to be used for this tab.

If the inflated layout contains a TextView with an ID of text1 then that will be updated with the value given to setText. Similarly, if this layout contains an ImageView with ID icon then it will be updated with the value given to setIcon.

Return

The current instance for call chaining

Parameters

resId

A layout resource to inflate and use as a custom tab view