Alex Vanyo (he/him)

380 Followers
78 Following
83 Posts

Android Developer Relations Engineer @ Google, opinions are my own.

When not working with insets, I also like to write code testing code-writing code.

GitHubhttps://github.com/alexvanyo
Websitehttps://alex.vanyo.dev
@commonsguy @gakisstylianos the slot lifecycle issue is a really tricky one. The next release of https://github.com/slackhq/compose-lints will have a new lint rule that should warn against some cases like this one which will lead to losing state.
GitHub - slackhq/compose-lints: Lint checks to aid with a healthy adoption of Compose

Lint checks to aid with a healthy adoption of Compose - slackhq/compose-lints

GitHub

Random PSA for anyone commonizing Compose code and utilizing lint checks like the built-in ones and https://github.com/slackhq/compose-lints.

Without extra work, those checks won't apply to common sources, so stuff that you thought lint would catch might have slipped through.

The extra configuration needed, based on AndroidX's setup and https://github.com/slackhq/slack-gradle-plugin:

https://github.com/alexvanyo/composelife/pull/2038

#JetpackCompose #AndroidDev

GitHub - slackhq/compose-lints: Lint checks to aid with a healthy adoption of Compose

Lint checks to aid with a healthy adoption of Compose - slackhq/compose-lints

GitHub
🚀 Tune in for Episode 125 on https://cwti.link/twitch as Alex Vanyo and Ian Clifton from Google dive into design, large screens, and Material3! Don't miss these expert insights! #AndroidDev #MaterialDesign
CodeWithTheItalians - Twitch

Two Italian coders live stream their sweary, mostly unsuccessful attempts at coding stuff.

Twitch

@gakisstylianos Because the configuration values depended on the insets, a lot of strange edge cases show up, especially around almost square windows.

It has been possible that Configuration.orientation is portrait, but Configuration.screenWidthDp > Configuration.screenHeightDp.

It's also been possible that rotating a device would always report a landscape Configuration.orientation.

This will affect qualified resource resolution, but it should be in an overall positive way.

Android 15 will have a tweak to Configuration values that is a great long-term change, especially in combination with edge-to-edge.

Previously, the Configuration's values were smaller than the overall window size by an amount of insets.

Once an app targets API 35 in Android 15, those values will now more closely match the actual window size, and include the space that is taken up by insets.

https://developer.android.com/about/versions/15/behavior-changes-15#stable-configuration

#AndroidDev

Behavior changes: Apps targeting Android 15 or higher  |  Android Developers

Learn about changes in Android 15 that will affect apps when they target Android 15 or higher.

Android Developers

Circles and stars are great and all, but sometimes designs call for a shape that can create an aperioidic tiling.

With this new change to androidx graphics-shapes, you can create a shape from the hat-turtle continuum to get the einstein tile you need!
https://android-review.googlesource.com/c/platform/frameworks/support/+/3020721

#androiddev

@zachklipp at least now you can say you started a one-pager!
@alex_vanyo this is going to make it so much easier to test for accessibility!!

Size is my favorite one:

DeviceConfigurationOverride(
DeviceConfigurationOverride.ForcedSize(DpSize(1280.dp, 800.dp))
) {
MyScreen() // will be rendered in the space for 1280dp by 800dp without clipping
}

Through a bit of trickery by overriding the density, MyScreen() will be guaranteed to have 1280dp by 800dp space to render, regardless of the actual device size.

You can test layouts big and small on a single test device!

Want to test a component with an increased font scale?

DeviceConfigurationOverride(DeviceConfigurationOverride.FontScale(1.5f)) {
MyComponent()
}