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

nglauber

12/06/2019, 1:00 PM
Where can I find the API changes from dev02 to dev03? I have a presentation tomorrow and I’d like to update the content…
r

Roar Gronmo

12/06/2019, 1:10 PM
I've struggling to find any post saying what has changed, so needed to take an old "JetNews" sample and compare it to the new One. And then check the documentation on https://developer.android.com/reference/kotlin/androidx/ui/packages It would have been nice to have a kind of statement or overview on what has changed, You can take a peak here to: https://android.googlesource.com/platform/frameworks/support/+/refs/heads/androidx-master-dev/ui Thats the further end... I am not sure if this last one is "official". RG
...and check the readme.md on https://android.googlesource.com/platform/frameworks/support/+/refs/heads/androidx-master-dev/ui There are some good clues there too.
And its quite a lot of changes...
n

nglauber

12/06/2019, 1:29 PM
that’s weird… In Jetnews
setContent
is working, but it’s not showing up in my project 🤔
Oh! I see… there’s more dependencies…
r

Roar Gronmo

12/06/2019, 1:31 PM
Yes, there are many new ones...
l

Louis Pullen-Freilich [G]

12/06/2019, 2:10 PM
Yeah, previously we were not generating the correct pom files, so all of our dependencies had transitive dependencies by default. Since dev02 we fixed that so now we respect
implementation
vs
api
dependencies, so that our libraries don't leak their implementation details as transitive dependencies.
r

Roar Gronmo

12/06/2019, 2:14 PM
So... they go undercover...😎
n

nglauber

12/06/2019, 3:04 PM
Is there a way to centralize the all children of a
Column
? The old
crossAxisAlignment
s

Simon Schubert

12/06/2019, 3:52 PM
@nglauber did you figure out how to center children in dev03?
Copy code
modifier = Gravity.Center
would make sense but my Android Studio can't find the declaration of Center
n

nglauber

12/06/2019, 3:55 PM
yep!
the workaround was put this in every child 🤷‍♂️
s

Simon Schubert

12/06/2019, 3:58 PM
Ah I see, adding
Gravity.Center
to
Column
doesn't resolve but adding it to
Text
works. I hope thats going to change 🤔
r

Roar Gronmo

12/06/2019, 7:08 PM
Isn't that within the child item itself? I.e. the Text boundaries ?
@nglauber How did your presentation go ?
n

nglauber

12/08/2019, 3:01 AM
hey @Roar Gronmo! it was great 🙂 thanks for asking. I did two demos during my presentation and they worked as expected 😊
@Simon Schubert I found this:
Copy code
Center {
    Column {
        Text(text = "Text 1")
        Text(text = "Text 2")
        Text(text = "Text 3")
    }
}
f

Fudge

12/09/2019, 12:27 AM
I’ve been wondering of the purpose of these files. Are these actually meant to be read by humans (considering javadocs/kdocs already fill that space)?
c

Chris Craik

12/09/2019, 1:45 AM
They are - They're used during code reviews to prevent accidentally add public apis we don't want. There's more strictness in that review as to not just general shape of the API, but also e.g. consistency in naming and documentation. They're also used by scripts that verify we don't ship e.g. changes to a public API in an rc, or bugfix release.
s

Simon Schubert

12/09/2019, 9:25 AM
@nglauber congratulation to the successful presentation and thanks for the
Center
hint. I stumped over it but I had some weird site effects when using it. And thanks for the document @Chris Craik
g

Geert

12/11/2019, 12:17 PM
Is there also a way to use Center only for horizontal or vertical? Currently it litteraly puts in in the center of the whole screen, not just the Column I placed it in.
r

Roar Gronmo

12/11/2019, 12:30 PM
You could use Column and Row in combination, and set the modifier with Gravity (check the #compose thread, I've asked something similar couple days ago) Gravity isn't referenced in the documentary for Row and Column yet, it seems to be a separate object.
g

Geert

12/11/2019, 12:44 PM
Yes this works better, thanks|!
5 Views