Created
August 27, 2023 20:32
-
-
Save waseefakhtar/660b4d2bc02da6a5286333de39f6dd76 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@OptIn(ExperimentalMaterial3Api::class) | |
@Composable | |
fun AddMedicationScreen() { | |
var medicationName by rememberSaveable { mutableStateOf("") } | |
Column( | |
modifier = Modifier | |
.padding(16.dp, 16.dp) | |
.verticalScroll(rememberScrollState()), | |
verticalArrangement = Arrangement.spacedBy(8.dp) | |
) { | |
Text( | |
text = stringResource(id = R.string.add_medication), | |
fontWeight = FontWeight.Bold, | |
style = MaterialTheme.typography.displaySmall | |
) | |
Spacer(modifier = Modifier.padding(8.dp)) | |
Text( | |
text = stringResource(id = R.string.medication_name), | |
style = MaterialTheme.typography.bodyLarge | |
) | |
TextField( | |
modifier = Modifier.fillMaxWidth(), | |
value = medicationName, | |
onValueChange = { medicationName = it }, | |
placeholder = { Text(text = "e.g. Hexamine") }, | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment