Table of contents
My app on the Google play store
Introduction
- This blog post will give you a demonstration of what can be done when someone has a advanced understanding of the Jetpack compose system. I won't go into details about the advanced topics of Jetpack compose (specifically because I don't have a good understanding of them). However, I will give you a demonstration of something cool(FlowRow) that was created by someone who has a deep understanding of the advanced topics in jetpack compose. I will also give you resources if you wish to read more about these topics.
Resources
The FlowRow()
- So I made this UI where the little tags at the bottom were created via a FlowRow(). HERE is the code:
FlowRow(
modifier = Modifier.background(Color.Transparent).padding(bottom = 10.dp)
) {
tags.forEach { tagTitle ->
VerticalTagText(tagTitle)
}
}
- Here is the UI:
- Notice how the tags(Cozy, GoodVibes, SFW, ect...) at the bottom, automatically wrap. This is very useful but it makes me curious.... how is it doing this?
The Interesting part
The interesting part of the
FlowRow()
is when we look at the source code, HERE. We can see on THIS line that the compose team is creating acustom measure policy
. Which is a part of the compose lifecycle, specifically themeasuring
phase.I find all this so interesting because we can read about How Jetpack Compose Measuring Works and see a real life implementation and it gets used by a ton of people!!!!!! Finally a real work example!!!!!
Very cool right?!?!?! I love a good practical example. Ok thats it for me, happy coding :)
Conclusion
- Thank you for taking the time out of your day to read this blog post of mine. If you have any questions or concerns please comment below or reach out to me on Twitter.
Top comments (0)