我需要首先以折叠状态显示我的底页。并且在向上滑动底片时,它应该首先固定在屏幕的一半高度。再次向上滑动,它应该扩展到屏幕的最大高度。崩溃时也一样。首先从最大高度到一半高度,然后到窥视高度(在折叠状态下可见的底板的高度)。有没有办法使用BottomSheetScaffold来实现它?
TabRow(
selectedTabIndex = tabIndex,
modifier = Modifier
.fillMaxWidth()
.wrapContentHeight(),
indicator = {tabPositions->
Box(
modifier = Modifier
.tabIndicatorOffset(tabPositions[tabIndex])
.height(indicatorSize)
.background(color = indicatorColor)
)
}
)
Run Code Online (Sandbox Code Playgroud)
我们可以在指示器中添加任何内容以将其移至顶部吗?我在 jetpack compose 中看不到与此“app:tabIndicatorGravity”类似的内容。