From ae956738563bc52d422b408fdac297a49a24d800 Mon Sep 17 00:00:00 2001 From: dankito Date: Thu, 5 Sep 2024 00:17:48 +0200 Subject: [PATCH] Added account's currency next to amount TextField --- .../banking/ui/dialogs/TransferMoneyDialog.kt | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/dialogs/TransferMoneyDialog.kt b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/dialogs/TransferMoneyDialog.kt index ee9bf82..279709e 100644 --- a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/dialogs/TransferMoneyDialog.kt +++ b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/dialogs/TransferMoneyDialog.kt @@ -180,17 +180,17 @@ fun TransferMoneyDialog( keyboardOptions = KeyboardOptions(imeAction = ImeAction.Next) ) - Spacer(modifier = Modifier.height(verticalSpace)) + Row(Modifier.padding(vertical = verticalSpace).fillMaxWidth(), verticalAlignment = Alignment.CenterVertically) { + OutlinedTextField( + value = amount, + onValueChange = { amount = it }, + label = { Text("Betrag") }, + modifier = Modifier.weight(1f).focusRequester(amountFocus), + keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Decimal, imeAction = ImeAction.Next) + ) - OutlinedTextField( - value = amount, - onValueChange = { amount = it }, - label = { Text("Betrag") }, - modifier = Modifier.fillMaxWidth().focusRequester(amountFocus), - keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Decimal, imeAction = ImeAction.Next) - ) - - Spacer(modifier = Modifier.height(verticalSpace)) + Text(formatUtil.formatCurrency(senderAccount.currency), Modifier.padding(start = 4.dp)) + } AutocompleteTextField( "Verwendungszweck (optional)",