File tree Expand file tree Collapse file tree
java/com/health/openscale/ui/screen/dialog Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package com.health.openscale.ui.screen.dialog
22
3+ import android.R.attr.inputType
4+ import android.R.attr.onClick
35import android.R.attr.type
46import androidx.compose.foundation.clickable
57import androidx.compose.foundation.layout.*
@@ -293,6 +295,14 @@ fun NumberInputDialog(
293295 }
294296 },
295297 dismissButton = {
298+ TextButton (
299+ onClick = {
300+ currentValueForDialog = " "
301+ }
302+ ) {
303+ Text (stringResource(R .string.clear_button))
304+ }
305+
296306 TextButton (onClick = onDismiss) {
297307 Text (stringResource(R .string.cancel_button))
298308 }
@@ -309,7 +319,7 @@ fun NumberInputDialog(
309319 },
310320 text = {
311321 NumberInputField (
312- initialValue = initialValue ,
322+ initialValue = currentValueForDialog ,
313323 inputType = inputType,
314324 unit = unit,
315325 onValueChange = { newValueFromField ->
Original file line number Diff line number Diff line change 1010 <!-- Generische UI-Elemente & Aktionen -->
1111 <string name =" enable_button" >Aktivieren</string >
1212 <string name =" cancel_button" >Abbrechen</string >
13+ <string name =" clear_button" >Löschen</string >
1314 <string name =" confirm_button" >Bestätigen</string >
1415 <string name =" dialog_ok" >OK</string >
1516 <string name =" switch_on" >An</string >
Original file line number Diff line number Diff line change 1111 <!-- Generic UI Elements & Actions -->
1212 <string name =" enable_button" >Enable</string >
1313 <string name =" cancel_button" >Cancel</string >
14+ <string name =" clear_button" >Clear</string >
1415 <string name =" confirm_button" >Confirm</string >
1516 <string name =" dialog_ok" >OK</string >
1617 <string name =" switch_on" >On</string >
You can’t perform that action at this time.
0 commit comments