How can I prevent the dragging functionality of BasicTextField. I dont want the user to be able to drag the text and make it invisible. Below a video with the functionality that I want to disable.
This my code:
@Composable
fun MyScreen() {
var input by remember {
mutableStateOf("")
}
Column(Modifier.padding(16.dp).fillMaxWidth()) {
BasicTextField(
modifier = Modifier.align(CenterHorizontally).width(IntrinsicSize.Min),
value = input,
singleLine = true,
onValueChange = { input = it },
textStyle = MaterialTheme.typography.h3,
decorationBox = { innerTextField ->
if (input.isEmpty()) {
Text(
text = "0",
style = MaterialTheme.typography.h3,
color = MaterialTheme.colors.onBackground.copy(alpha = 0.3f)
)
}
innerTextField()
}
)
}
}