Abhishek Dewan
07/30/2021, 7:03 AMAbhishek Dewan
07/30/2021, 7:03 AMBoxWithConstraints {
Column(
modifier = Modifier
.fillMaxWidth()
.height(maxHeight - 20.dp)
.background(ScoutTheme.colors.secondaryBackground)
.verticalScroll(state = scrollState)
) {
Column(modifier = Modifier.navigationBarsWithImePadding()) {
Header(game = game)
SelectPlatform(game = game, isPlatformSelected = { platformSelections.contains(it) }) { platform ->
if (platformSelections.contains(platform)) {
platformSelections.remove(platform)
} else {
platformSelections.add(platform)
}
}
GameStatus(isGameStatusSelected = { gameStatusSelection == it }) { gameStatus ->
gameStatusSelection = gameStatus
}
if (gameStatusSelection != null && (gameStatusSelection == GameStatus.COMPLETED || gameStatusSelection == GameStatus.ABANDONED)) {
RatingAndNotes(currentRating = ratingSelection, updateRating = { ratingSelection = it }, notes = notes) {
notes = it
}
}
Spacer(modifier = Modifier.height(20.dp))
}
}
}
divid3d
07/30/2021, 7:37 AMRelocationRequester.bringIntoView
?Tonic
07/30/2021, 2:32 PMAbhishek Dewan
07/30/2021, 3:18 PMTonic
07/30/2021, 3:36 PMColumn(Modifier.imePadding())
I've had success in bring a view above the soft keyboard, but only when using a coroutine that polls the ime every frame for the completion of its animation and only then calling RelocationRequester. However, the scroll state gets reset by Column when it gets resized. I am currently looking into another approach, whereby I call ScollState.scrollBy(dy)
with dy = distance the view is below the top edge of the ime inset.batuhan ardor
11/01/2021, 8:39 PM