jetc.dev Newsletter Issue #115
Published: 2022-05-10
This week, we look again at design systems and testing. We look at text editing,
in terms of current problems and future solutions. And we see how MotionLayout()
(the composable) compares to MotionLayout
(the widget).
One Off the Stack, One Off the Slack
You’ve got questions. That’s understandable!
Can We Mix Compose and Compose Compiler Versions?
Compose has a version. The Compose Kotlin compiler plugin has a version. Do these need to be kept in sync? Learn more in this week’s highlighted Stack Overflow question!
StateFlow or State?
Here, Google’s Adam Powell takes another shot at a classic Compose conundrum:
do we use StateFlow
or State
for exposing reactive streams from a viewmodel?
See what Adam recommends in this week’s highlighted Kotlinlang #compose
Slack thread!
Composable Commentary
Posts, videos, and other new information related to Jetpack Compose!
Compose Hackathon: Day 1
Google’s Zach Klippenstein has a three-post series (second post and third post) outlining a hack-week experiment to change the Compose UI text editing APIs in a way that focuses on mutable data. 👀
Here’s a productivity hack to save tens of engineering hours* when working with Jetpack Compose!
Vinay Gaba is back, looking at how we can tailor Android Studio’s auto-complete suggestions to exclude items that embody YAGNI (You Aren’t Gonna Need It) and can be trimmed out of auto-complete drop-downs. The objective is to get the Compose UI auto-completion suggestions to be more focused and minimize accidental incorrect auto-complete selections.
Medium: Implementing a fully-custom Design Language System with Jetpack Compose — Part one: Foundation
Ehsan Mehranvari explores “The Great White Whale” in Compose UI development: avoiding
MaterialTheme()
and implementing a completely custom design system.
Slides: How to Test Your Compose UI
István Juhos delivered a presentation at the Kotlin Budapest Meetup on Compose UI testing, including how to improve the testability of your composables while improving accessibility at the same time.
Using MotionLayout in Compose
James Shvarts returns, looking at the experimental MotionLayout()
composable, bringing
the animation control of MotionLayout
to Compose UI. This includes creating a MotionScene
,
animating multiple composables, performing various types of animations, and debugging
when it does not quite work the way that you want.
Medium: Custom color elevation effect in Compose
Medium is moving to Compose UI. So, Medium wrote a Medium post (by Alexandre Bruneau)
on it! Specifically, it looks at elevation
on Surface()
in dark themes and how
illumination was not working as expected, courtesy of their custom theme, and what
Medium had to do to fix it.
Other Interesting Links
- Medium: 7 things to keep in mind while building jetpack composable’s.
- Medium: How to authenticate to Firebase using Google One Tap in Jetpack Compose?
- Angled Gradient Background in Android using Jetpack Compose
- Jetpack compose custom rating bar
- Custom AlertDialog with Jetpack Compose
- First Components – Labels & Buttons
Resource Roundup
100% pure code!
GitHub: onebone / parvenu
A bug in Compose UI makes it difficult
to implement a rich text editor, because styling gets dropped. GitHub user onebone
create a ParvenuEditor()
wrapper around BasicTextField()
that re-applies styles
for you to try to work around the problem.
GitHub: oleksandrbalan / modalsheet
Oleksandr Balan and Filip Wiesner tackled another Compose UI limitation: “modal” bottom sheets are
only modal within the parent composable. Sometimes, we need bottom sheets that
are modal at the system level. Oleksander and Filip leverage FullScreenPopup()
to implement
a system-modal bottom sheet, in the form of a ModalSheet()
composable.
Other Interesting Links
- GitHub: Jaseemakhtar / ComposeCG (demo of graphics algorithms)
- GitHub: ryanmoelter / magellanx (navigation)
- GitHub: azmiradi / CircleImageCompose (circle-crop images)
…And One More Thing
Sorry, this was not a great week for me, and a side effect is that I do not have anything for this section. 😞
I look forward to Google I|O on Wednesday and Thursday, and I look forward to all the new Compose stuff that we can all write about in the future!
Or, you can subscribe to the Atom feed or follow Mark Murphy in the Fediverse.
Recent Issues:
- 2024-10-01: Lazy grids! Focus! @colinmarsch@androiddev.social on CMP accessibility! @skydoves@androiddev.social on Landscapist! @sinasamaki@androiddev.social on Slider()! And... what is it?!?
- 2024-09-24: A Compose security fix and a new alpha! clipToBounds()! Localization! offset()! @skydoves@androiddev.social on server-defined UI! Bottom sheets! And... someone set us up *3* BOMs?!?
- 2024-09-17: Compose 1.7.1 and Compose Multiplatform 1.7.0-beta02! Flow layouts! TV Compose! SharedBounds! Image cropping! And... why does remember() not seem always to remember?!?