android OutlinedTextField on click and open to time picker its only work in label text click how to click whole OutlinedTextField on event
OutlinedTextField(
value = selectedTimeState,
onValueChange = { selectedTimeState = it },
label = { Text("Selected Time") },
modifier = Modifier
.fillMaxWidth().clickable {
Toast.makeText(context, "click", Toast.LENGTH_SHORT).show()
},
readOnly = true,
trailingIcon = {
Spacer(modifier = Modifier.width(8.dp))
Text(
text = AnnotatedString(text = lateTimeState),
style = MaterialTheme.typography.bodySmall
)
Spacer(modifier = Modifier.width(8.dp))
},
)
android OutlinedTextField on click and open to time picker
using the above code I have achieved the same thing and this is just for your reference because I have created my own composable function for my requirements If you don't understand many think's feel free to ask in comment.