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

nglauber

10/28/2019, 5:09 PM
Just starting with compose, so sorry for the dumb question but… I’m adding a
TextField
but it has no background or the bottom line like existing in
EditText
. Do you guys know how can I set it? This is what I’m doing.
Copy code
TextField(
            value = currentPerson.name,
            onValueChange = { currentPerson.name = it },
            editorStyle = EditorStyle(
                textStyle = TextStyle(
                    fontSize = (16.sp)
                )
            )
        )
Also, I’m trying to add two
TextFields
inside a
Row
and no luck so far… I’m getting this error:
Copy code
java.lang.IllegalArgumentException: minWidth 2147483647.ipx should be finite
l

Luca Nicoletti

10/28/2019, 5:10 PM
There’s a bug for
TextField
in a row https://issuetracker.google.com/issues/143165169
1
Feel free to star it
For the line: just draw it yourself 🧌
n

nglauber

10/28/2019, 5:12 PM
Really? 😱
r

romainguy

10/28/2019, 5:14 PM
TextField
is part of
core
, it is not a styled widget
The point of Compose is to allow to easily compose various components, and
TextField
provides what’s needed for text entry, but its role is not to build the decorations
That will be a material design component (I assume) that itself will use
TextField
👌 1
a

Anna-Chiara Bellini [G]

10/28/2019, 5:15 PM
The Material styled widget is not there yet... it will be
👆 4
l

Luca Nicoletti

10/28/2019, 5:16 PM
@romainguy Did you mean “*there will be* a material design component […]“? 🧌
🧌 2
n

nglauber

10/28/2019, 5:17 PM
I understand @romainguy. Thanks! @Anna-Chiara Bellini [G] thanks. I’m studying and writing a blog post about Compose, but I’m gonna wait to be able to add two TextFields in a Row and it has a background 😄
👍 2
4