0

I'm trying to build a clone Android Calculator app so that I can simulate the display of the digits I'm using the TextField component as it, said that, I'd like to know how to disable invoking the virtual keyboard when tapping on one.

Because when I'm running the original Android Calculator I realize I can just tap on the display for pasting some numeric text and it doesn't invoke the virtual keyboard, so I'd like to get the one behaves the same way.

Idk is there that possibility?

My TextField component's code snippet:

TextField(
         value = "1000",
         onValueChange = {

         },
         modifier = Modifier
                        .fillMaxWidth()
                        .padding(0.dp)
                    )
Jorge Luiz
  • 281
  • 4
  • 10
  • I found out the solution for my issue in this SO's question: [Prevent the keyboard from appearing in a Jetpack Compose app](https://stackoverflow.com/questions/63887321/prevent-the-keyboard-from-appearing-in-a-jetpack-compose-app) – Jorge Luiz Apr 11 '22 at 02:54

1 Answers1

-1

Try adding enabled = false,

TextField(value = "1000", enabled = false)

Sartaj Roshan
  • 204
  • 2
  • 6
  • That doesn't work for me because the TextField allows to **copy and past** content on it and does the cursor **blinks** when gets focus similar to the Android's Calculator's numeric display. – Jorge Luiz Mar 19 '22 at 22:00