diff --git a/merchant-terminal/src/main/java/net/taler/merchantpos/checkout/CheckoutAmountEntry.kt b/merchant-terminal/src/main/java/net/taler/merchantpos/checkout/CheckoutAmountEntry.kt index a22c8c34..994b6507 100644 --- a/merchant-terminal/src/main/java/net/taler/merchantpos/checkout/CheckoutAmountEntry.kt +++ b/merchant-terminal/src/main/java/net/taler/merchantpos/checkout/CheckoutAmountEntry.kt @@ -244,16 +244,35 @@ internal fun CheckoutAmountEntry( isLandscape -> { + // The keypad is a fixed stack: four rows of keys, a gap, + // and the submit button. At 48 dp a key that is 280 dp + // tall, and a phone in landscape leaves about 300 dp once + // the title row and this padding are taken off -- so the + // submit button, which carries the amount about to be + // recorded, was drawn half off the bottom of the screen + // with no way to scroll to it. The keys give way first, + // and the column scrolls as a backstop, which is what + // every other branch here already does. + val keyGap = 8.dp + val actionGap = 16.dp + val submitHeight = 48.dp + val keyHeight = + ((maxHeight - 40.dp - keyGap * 3 - actionGap - submitHeight) / 4) + .coerceIn(36.dp, 48.dp) Row( modifier = Modifier.fillMaxSize().padding(horizontal = 24.dp, vertical = 20.dp), horizontalArrangement = Arrangement.spacedBy(36.dp), verticalAlignment = Alignment.Top, ) { CheckoutNumberPad( - modifier = Modifier.weight(0.59f), - keyHeight = 48.dp, - keyGap = 8.dp, - actionGap = 16.dp, + modifier = + Modifier + .weight(0.59f) + .fillMaxHeight() + .verticalScroll(rememberScrollState()), + keyHeight = keyHeight, + keyGap = keyGap, + actionGap = actionGap, submitLabel = submitLabel, enabled = submitEnabled, onDigit = onDigit,