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
@Composable | |
fun SectionTextView( | |
modifier: Modifier = Modifier, | |
text: String, | |
isSelected: Boolean | |
) { | |
Column(modifier) { | |
var textWidth by remember { mutableStateOf(0.dp) } | |
val density = LocalDensity.current |
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
//User name text field | |
Column{ | |
val focusManager = LocalFocusManager.current | |
AppTextField( | |
text = viewModel.firstName, | |
placeholder = "First Name", | |
onChange = { | |
viewModel.firstName = it | |
}, |
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
class FormViewModel : ViewModel() { | |
var firstName by mutableStateOf("") | |
var lastName by mutableStateOf("") | |
var password by mutableStateOf("") | |
var mobileNumber by mutableStateOf("") | |
var mobileCountryCode by mutableStateOf("") | |
var dateOfBirth by mutableStateOf("") | |
//... |
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
fun AppTextField( | |
modifier: Modifier = Modifier, | |
text: String, | |
placeholder: String, | |
leadingIcon: @Composable (() -> Unit)? = null, | |
onChange: (String) -> Unit = {}, | |
imeAction: ImeAction = ImeAction.Next, | |
keyboardType: KeyboardType = KeyboardType.Text, | |
keyBoardActions: KeyboardActions = KeyboardActions(), | |
isEnabled: Boolean = true |
NewerOlder