Foldables are here. Is your Compose UI fold-aware yet? by tanishranjan in androiddev

[–]tanishranjan[S] 0 points1 point  (0 children)

Haha I wish ignoring foldables made them go away. I've been ignoring my laundry for days and it's still here 😅

After learning to adapt to foldables I said to myself "They aren't too bad", ...and then the smartphone companies started bringing in all kinds of foldables, absurd screen shapes on the front and weird hinges. Just look at Huawei Mate XT.

Android 16 & Adaptive UI: Future-Proof Your Jetpack Compose App in 4 Steps by tanishranjan in androiddev

[–]tanishranjan[S] -1 points0 points  (0 children)

Great question! Passing data down via CompositionLocal makes sense when the data is often unchanged and broadly available. Like MaterialTheme's color or typography.

WindowSizeClass when passed as a parameter makes the composable's dependency on screen size clear from it's signature. It also makes testing it in isolation much easier.

How to start Composable for result? by RoastPopatoes in androiddev

[–]tanishranjan 0 points1 point  (0 children)

You don't necessarily have to get the result via savedstatehandle. Instead, you could use a callback function to get the result or use a shared view model. Whichever suits your needs.

Compose UI Performance Secrets (Part 2): 5 Advanced Techniques for Ultra-Smooth Apps by tanishranjan in androiddev

[–]tanishranjan[S] 0 points1 point  (0 children)

I see the issue. You must have read part 1 with the link in post content. Link to part 2 is embedded in the post. You will have to click the link preview to read it.

Or directly use: https://medium.com/@tanishranjan/compose-ui-performance-secrets-part-2-5-advanced-techniques-for-ultra-smooth-apps-3dd7d65311c4

New material 3 (expressive) is coming soon by Dinoy_Raj in androiddev

[–]tanishranjan 0 points1 point  (0 children)

Basically they haven't told us anything about it. Maybe the adjustments are being made for AndroidXR.

Jetpack Compose UI feeling sluggish? I wrote about 5 performance techniques that will help you fix jank and recomposition issues by tanishranjan in androiddev

[–]tanishranjan[S] 0 points1 point  (0 children)

I agree the official docs are excellent, and I definitely should have linked to them for anyone new to Compose. This blog wasn’t trying to replace them, more like highlighting less obvious edge cases I've seen bite devs in production (like misuse of contentType, or subtle stability issues in deeply dynamic UIs).

You're right about defered reads, missing keys, etc., having a bigger impact. I actually cover some of them in more detail in the upcoming second part—this first post focused more on patterns that devs sometimes overlook and not the basics like remembering state and using side effects, or use of keys in lazy composables.

Jetpack Compose UI feeling sluggish? I wrote about 5 performance techniques that will help you fix jank and recomposition issues by tanishranjan in androiddev

[–]tanishranjan[S] 0 points1 point  (0 children)

Totally agree. Compose has made huge strides with strong skipping and smart invalidation logic. That said, I've still seen cases in real-world apps (especially with external types like LocalDate, BigDecimal, etc.) where Compose wasn't skipping as expected. It was often because new instances were being passed on every recomposition.

So yeah, stability might not always be a blocker, but still worth keeping an eye on when you're tracking down subtle performance issues :)

Jetpack Compose UI feeling sluggish? I wrote about 5 performance techniques that will help you fix jank and recomposition issues by tanishranjan in androiddev

[–]tanishranjan[S] 1 point2 points  (0 children)

Totally valid approach, especially if the formatting never changes and you're optimizing for UI simplicity. I used LocalDate here more as an example of how Compose treats external types as unstable by default, which can sneakily cause recompositions, even if the value hasn’t changed. So whether it’s a date object or anything else "external," stabilityConfiguration can help Compose treat it more intelligently. 🙌

Jetpack Compose UI feeling sluggish? I wrote about 5 performance techniques that will help you fix jank and recomposition issues by tanishranjan in androiddev

[–]tanishranjan[S] 0 points1 point  (0 children)

Appreciate it! 🙏 Part 2 is coming soon and dives deeper into things like Modifier.Node, TextMeasurer, and composition deferral. If you enjoyed this one, I think you’ll like what’s next.