Unleashing Creativity with Custom Modifiers in Android Jetpack Compose | by Nirbhay Pherwani | Aug, 2023
Example 1 — Gradient Background Modifier Create a custom modifier that applies a gradient background to a composable. This can be used to provide a consistent visual theme across your app’s components. Gradient Background Custom Modifier fun Modifier.gradientBackground(colors: List<Color>): Modifier = composed {drawWithContent {drawRect(brush =…
Mobile App Development
0
Improving Android Accessibility with Modifiers in Jetpack Compose | by Eevis Panula | Jul, 2023
The other day, I was doing some accessibility fixes on our codebase. I came across a switch that didn’t have a label associated with it, meaning screen reader users would need to do a bit of guessing to get the information on what they were…