Where can I find the API changes from dev02 to dev...
# compose
n
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
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
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
Yes, there are many new ones...
l
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
So... they go undercover...😎
n
Is there a way to centralize the all children of a
Column
? The old
crossAxisAlignment
s
@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
yep!
the workaround was put this in every child 🤷‍♂️
s
Ah I see, adding
Gravity.Center
to
Column
doesn't resolve but adding it to
Text
works. I hope thats going to change 🤔
r
Isn't that within the child item itself? I.e. the Text boundaries ?
@nglauber How did your presentation go ?
n
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
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
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
@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
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
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
Yes this works better, thanks|!