https://kotlinlang.org logo
#compose
Title
# compose
g

Grigorii Yurkov

10/30/2019, 4:58 PM
What's EditText analog in compose? I've tried TextField but it throws NotImplementedError when I click on it
l

Luca Nicoletti

10/30/2019, 4:58 PM
TextField
is what you’re looking for, you might be doing something else wrong
g

Grigorii Yurkov

10/30/2019, 5:08 PM
l

Luca Nicoletti

10/30/2019, 5:59 PM
Are you sure
value
needs to be a
String
?
g

Grigorii Yurkov

10/30/2019, 6:04 PM
l

Louis Pullen-Freilich [G]

10/30/2019, 6:41 PM
What API level are you running this on? I think it is only currently supported on newer versions - see: http://issuetracker.google.com/issues/143220669
g

Grigorii Yurkov

10/30/2019, 6:47 PM
composeVersion is "0.1.0-dev02", minSdkVersion is 21. Running on 28 api
l

Luca Nicoletti

10/30/2019, 7:30 PM
Can you try using the
TextField
which accept an
EditorModel
?
g

Grigorii Yurkov

10/30/2019, 7:44 PM
TextField(EditorModel(text = "123"))
same error
l

Luca Nicoletti

10/30/2019, 7:44 PM
The problem is not related to that part of code then
I can use both
TextField
without any problems
g

Grigorii Yurkov

10/30/2019, 7:45 PM
u have "0.1.0-dev02" version too?
l

Luca Nicoletti

10/30/2019, 7:45 PM
Yes
f

Fudge

10/30/2019, 7:45 PM
I've tried TextField but it throws NotImplementedError when I click on it
Perhaps it is not implemented?
but it works for Luca... ok I see
g

Grigorii Yurkov

10/30/2019, 7:50 PM
Can you send me apk file? I will try to run it on my device
l

Luca Nicoletti

10/30/2019, 7:50 PM
Can you send more code? 😂
Maybe we can help you figure out
Just saying:
TextField
crash is not helping
g

Grigorii Yurkov

10/30/2019, 7:51 PM
I've sent you all code
l

Luca Nicoletti

10/30/2019, 7:56 PM
Next time please, not an image 😉
g

Grigorii Yurkov

10/30/2019, 7:58 PM
ok
7 Views