Skip to content

Instantly share code, notes, and snippets.

@Ahmad-Hamwi
Last active March 18, 2023 21:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ahmad-Hamwi/4eb8e43d83c57f9b8d447ecb2e9b2c77 to your computer and use it in GitHub Desktop.
Save Ahmad-Hamwi/4eb8e43d83c57f9b8d447ecb2e9b2c77 to your computer and use it in GitHub Desktop.
@Composable
fun TabSyncExampleScreen(categories: List<Category>) {
val selectedTabIndex by remember { mutableStateOf(0) }
val lazyListState = rememberLazyListState()
Column {
MyTabBar(
categories = categories,
selectedTabIndex = selectedTabIndex,
onTabClicked = { index, _ -> selectedTabIndex = index }
)
MyLazyList(categories, lazyListState)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment