Adjust tab indicator visual (#9219)

Now behaves like the non-compose indicator by showing the swipe progress too
This commit is contained in:
Ivan Iskandar
2023-03-17 09:20:25 +07:00
committed by GitHub
parent 4d3e13b0d1
commit 18e55aa25f
6 changed files with 82 additions and 10 deletions
@@ -56,7 +56,7 @@ fun TabbedDialog(
TabRow(
modifier = Modifier.weight(1f),
selectedTabIndex = pagerState.currentPage,
indicator = { TabIndicator(it[pagerState.currentPage]) },
indicator = { TabIndicator(it[pagerState.currentPage], pagerState.currentPageOffsetFraction) },
divider = {},
) {
tabTitles.fastForEachIndexed { i, tab ->
@@ -69,7 +69,7 @@ fun TabbedScreen(
) {
TabRow(
selectedTabIndex = state.currentPage,
indicator = { TabIndicator(it[state.currentPage]) },
indicator = { TabIndicator(it[state.currentPage], state.currentPageOffsetFraction) },
) {
tabs.forEachIndexed { index, tab ->
Tab(