Content Switcher
Content switcher
Content switchers allow users to toggle between two or more content sections within the same space on the screen.
Content switchers are frequently used to let users toggle between different formattings, like a grid view and a table view. They are also often used to narrow large content groups or to sort related content. For example, a messaging tool may use a content switcher to divide messages into three views such as “All,” “Read,” and “Unread.”
(From Content switcher documentation)
Parameters
A list of strings representing the options to be displayed. Each string is a label for an option. At least two options are required, otherwise, an IllegalArgumentException will be thrown.
The currently selected option.
Callback invoked when an option is selected. The label of the selected option is passed as a parameter.
The modifier to be applied to the content switcher.
The ContentSwitcherSize to be applied to the content switcher. Defaults to ContentSwitcherSize.Medium.
Whether the content switcher is enabled or disabled.