Displaying max allowed characters
This commit is contained in:
parent
a58bd1d2ce
commit
a2d752aca1
|
@ -20,6 +20,7 @@ import net.codinux.banking.ui.composables.tan.ImageSizeControls
|
||||||
import net.codinux.banking.ui.config.Colors
|
import net.codinux.banking.ui.config.Colors
|
||||||
import net.codinux.banking.ui.config.DI
|
import net.codinux.banking.ui.config.DI
|
||||||
import net.codinux.banking.ui.extensions.ImeNext
|
import net.codinux.banking.ui.extensions.ImeNext
|
||||||
|
import net.codinux.banking.ui.forms.CaptionText
|
||||||
import net.codinux.banking.ui.forms.OutlinedTextField
|
import net.codinux.banking.ui.forms.OutlinedTextField
|
||||||
import net.codinux.banking.ui.forms.Select
|
import net.codinux.banking.ui.forms.Select
|
||||||
import net.codinux.banking.ui.model.Config.NewLine
|
import net.codinux.banking.ui.model.Config.NewLine
|
||||||
|
@ -140,6 +141,8 @@ fun CreateEpcQrCodeScreen(onClosed: () -> Unit) {
|
||||||
keyboardOptions = KeyboardOptions.ImeNext
|
keyboardOptions = KeyboardOptions.ImeNext
|
||||||
)
|
)
|
||||||
|
|
||||||
|
CaptionText("${receiverName.length} / 70")
|
||||||
|
|
||||||
OutlinedTextField(
|
OutlinedTextField(
|
||||||
label = { Text("IBAN") },
|
label = { Text("IBAN") },
|
||||||
value = iban,
|
value = iban,
|
||||||
|
@ -156,14 +159,18 @@ fun CreateEpcQrCodeScreen(onClosed: () -> Unit) {
|
||||||
keyboardOptions = KeyboardOptions.ImeNext
|
keyboardOptions = KeyboardOptions.ImeNext
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Row(Modifier.fillMaxWidth(), verticalAlignment = Alignment.CenterVertically) {
|
||||||
OutlinedTextField(
|
OutlinedTextField(
|
||||||
label = { Text("Betrag (optional)") },
|
label = { Text("Betrag (optional)") },
|
||||||
value = amount,
|
value = amount,
|
||||||
onValueChange = { amount = it },
|
onValueChange = { amount = it },
|
||||||
modifier = Modifier.fillMaxWidth().padding(vertical = 8.dp).focusRequester(amountFocus),
|
modifier = Modifier.weight(1f).padding(vertical = 8.dp).focusRequester(amountFocus),
|
||||||
keyboardOptions = KeyboardOptions.ImeNext
|
keyboardOptions = KeyboardOptions.ImeNext
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Text(DI.formatUtil.formatCurrency("EUR"), Modifier.padding(start = 4.dp)) // Euro is currently the only supported currency
|
||||||
|
}
|
||||||
|
|
||||||
OutlinedTextField(
|
OutlinedTextField(
|
||||||
label = { Text("Verwendungszweck (optional)") },
|
label = { Text("Verwendungszweck (optional)") },
|
||||||
value = reference,
|
value = reference,
|
||||||
|
@ -172,6 +179,8 @@ fun CreateEpcQrCodeScreen(onClosed: () -> Unit) {
|
||||||
keyboardOptions = KeyboardOptions.ImeNext
|
keyboardOptions = KeyboardOptions.ImeNext
|
||||||
)
|
)
|
||||||
|
|
||||||
|
CaptionText("${reference.length} / 140")
|
||||||
|
|
||||||
// not exposing it to user as it's a) not displayed by most apps and b) may causes overflow of used QR code library
|
// not exposing it to user as it's a) not displayed by most apps and b) may causes overflow of used QR code library
|
||||||
// OutlinedTextField(
|
// OutlinedTextField(
|
||||||
// label = { Text("Information für den Nutzer (optional)") },
|
// label = { Text("Information für den Nutzer (optional)") },
|
||||||
|
@ -180,6 +189,8 @@ fun CreateEpcQrCodeScreen(onClosed: () -> Unit) {
|
||||||
// modifier = Modifier.fillMaxWidth().padding(vertical = 8.dp),
|
// modifier = Modifier.fillMaxWidth().padding(vertical = 8.dp),
|
||||||
// keyboardOptions = KeyboardOptions.ImeNext
|
// keyboardOptions = KeyboardOptions.ImeNext
|
||||||
// )
|
// )
|
||||||
|
//
|
||||||
|
// CaptionText("${informationForUser.length} / 70")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue