Skip to content

Commit

Permalink
FLW-2709 Send. Buttons under keyboard
Browse files Browse the repository at this point in the history
  • Loading branch information
PankraSerg committed Nov 25, 2022
1 parent 400e5c0 commit 56222d1
Showing 1 changed file with 17 additions and 15 deletions.
Expand Up @@ -130,6 +130,15 @@ fun SendSetupContent(
FeeInfo(state = state.feeInfoState)

Spacer(modifier = Modifier.weight(1f))
}

val isSoftKeyboardOpen = WindowInsets.ime.getBottom(LocalDensity.current) > 0
val showQuickInput = state.amountInputState.isFocused && isSoftKeyboardOpen
Column(
modifier = Modifier
.align(Alignment.BottomCenter)
.imePadding()
) {
LazyRow(
modifier = Modifier.fillMaxWidth(),
horizontalArrangement = Arrangement.spacedBy(12.dp, Alignment.CenterHorizontally)
Expand All @@ -149,22 +158,15 @@ fun SendSetupContent(
.fillMaxWidth()
.height(48.dp)
)

MarginVertical(margin = 12.dp)
}

val isSoftKeyboardOpen = WindowInsets.ime.getBottom(LocalDensity.current) > 0
val showQuickInput = state.amountInputState.isFocused && isSoftKeyboardOpen
if (showQuickInput) {
QuickAmountInput(
modifier = Modifier
.align(Alignment.BottomCenter)
.imePadding(),
onQuickAmountInput = {
keyboardController?.hide()
callback.onQuickAmountInput(it)
}
)
if (showQuickInput) {
QuickAmountInput(
onQuickAmountInput = {
keyboardController?.hide()
callback.onQuickAmountInput(it)
}
)
}
}
}
}
Expand Down

0 comments on commit 56222d1

Please sign in to comment.