Package-level declarations
Types
Link copied to clipboard
data class TabDetails(val icon: ImageVector? = null, val selectedIcon: ImageVector = Icons.Default.Check, val tabTitle: String)
Data class used to represent the details of a tab
Link copied to clipboard
class TabSelectorState
The TabSelectorState class is useful to manage a TabSelector component giving the details currently used in that component
Properties
Link copied to clipboard
MAX_TABS_ALLOWED
the max number of allowed tabs for the TabSelector
Functions
Link copied to clipboard
The remember function used to create a TabSelectorState for a TabSelector component
Link copied to clipboard
private fun SingleChoiceSegmentedButtonRowScope.Tab( pagerState: PagerState?, state: TabSelectorState, tab: TabDetails, currentIndex: Int, firstEntry: TabDetails, lastEntry: TabDetails, initialTabShape: Shape, middleShape: Shape, lastTabShape: Shape)
Custom button tab
Link copied to clipboard
fun TabSelector( modifier: Modifier = Modifier, state: TabSelectorState, tabs: List<TabDetails>, initialTabShape: Shape = RoundedCornerShape(
topStart = 0.dp,
bottomStart = 10.dp
), middleShape: Shape = RectangleShape, lastTabShape: Shape = RoundedCornerShape(
topEnd = 0.dp,
bottomEnd = 10.dp
), swipingEnabled: Boolean = true, tabContent: @Composable (TabDetails, Int) -> Unit)
Custom tab selector to select the tab to display