r/JetpackComposeDev • • Aug 10 '25

Tutorial Accessibility in Jetpack Compose - Why It’s a Must for Developers

Thumbnail
gallery
7 Upvotes

Accessibility means making apps usable for everyone, including people with disabilities.

  • Around 1 in 4 adults in the US have a disability.

  • In the US, the ADA law requires accessible digital products.

  • Good accessibility = better user experience for all users.

In Jetpack Compose you can:

  • Use bigger touch targets (48dp or more)

  • Add contentDescription to images/icons

  • Add click labels for screen readers

  • Ensure good color contrast

If you make US-based apps, accessibility is a must. It helps more people use your app, avoids legal issues, and can improve ratings.

Learn more: Jetpack Compose Accessibility (Written by a Googler))


r/JetpackComposeDev • • Apr 28 '26

News What's new in the Jetpack Compose April '26 release

Thumbnail
android-developers.googleblog.com
6 Upvotes

r/JetpackComposeDev • • Nov 26 '25

Kmposable - Kotlin Multiplatform navigation and stateflow runtime

6 Upvotes

🚀 I've been building Kmposable - a headless navigation + flow engine for Kotlin Multiplatform. It lets you write your app logic as pure Nodes (state + events + outputs), keep navigation/UI concerns separate, and test everything without a UI. What I personally like about it is that it makes your projects more AI-friendly, since AI does a much better job when you have a clean business flow that isn't coupled to heavy UI interactions.

Highlights:

• KMP-first, UI-agnostic

• Tiny NavFlow runtime with a predictable lifecycle

• Compose adapter + ViewModel helpers so UI stays declarative

• Flow-script DSL: navFlow.runFlow { step("Login") { awaitOutputCase { … }; finish() } } (This is a highly experimental feature for building sequential UI navigation and flows; I wouldn't recommend using it in production apps yet.)

If you enjoy "business logic first, UI second" architecture (and reusable, testable flows), give it a look and tell me what you think! As usual, stars ⭐️ are welcome.

I use this approach in my own apps, so this isn't some gimmick project - it already makes my apps better, and that's why I want to share it.

Repo:

https://github.com/mobiletoly/kmposable

Docs:

https://mobiletoly.github.io/kmposable

(I still need to do a better job making the docs clearer and easier to digest.)


r/JetpackComposeDev • • Oct 21 '25

Variable font weight not changing dynamically in Android even with fvar table and Typeface.Builder

6 Upvotes

Hey everyone 👋

I’ve been trying to implement dynamic font weight adjustment for a clock UI in my Android project (the user can change font thickness using a slider).

Here’s what I’ve done so far:

  • Using TextClock inside AndroidView, where the weight changes based on a slider value.

  • Works perfectly with the default system font — smooth transition as the slider moves.

  • But for custom fonts (like Digital_7), it only toggles between normal and bold, no smooth interpolation.

  • Checked using ttx -t fvar, and most of these fonts don’t have an fvar table, so they’re static.

  • When I searched online, it mentioned that only fonts having an fvar table can support multiple weight variations, since that defines the 'wght' axis for interpolation.

  • So I added another font (Inter-Variable, which has both fvar and 'wght' axes**) — but still getting the same result.

  • Tried both Typeface.create(...) and Typeface.Builder(...).setFontVariationSettings("'wght' X"), but visually, the weight doesn’t change.

Question

Does Typeface.Builder(...).setFontVariationSettings() fully work for variable fonts on Android?

Or does TextClock not re-render weight changes dynamically?

Has anyone successfully implemented live font weight adjustment using Typeface and variable fonts?

Any insights or examples would be super helpful


r/JetpackComposeDev • • Oct 05 '25

Tutorial Learn how to use Jetpack Compose Animation APIs. | Animation codelab

Thumbnail developer.android.com
6 Upvotes

In this codelab, you will learn how to use some of the Animation APIs in Jetpack Compose.


r/JetpackComposeDev • • Sep 29 '25

Tool ShadowGlow: An Advanced Drop Shadows for Jetpack Compose

6 Upvotes

🌟 Just shipped something exciting for the Android dev community!

After countless hours of experimenting with Jetpack Compose modifiers, I've built ShadowGlow, my first ever maven published open-source library that makes adding stunning glow effects and advanced attractive drop shadows ridiculously simple! ✨

it's as simple as just adding `Modifier.shadowGlow()` with a variety of configuration you can go for.

📍Here's the list of things it can do:

🎨 Solid & Gradient Shadows: Apply shadows with solid colors or beautiful multi-stop linear gradients.

📐 Shape Customization: Control borderRadius, blurRadius, offsetX, offsetY, and spread for precise shadow appearances.

🎭 Multiple Blur Styles: Choose from NORMAL, SOLID, OUTER, and INNER blur styles, corresponding to Android's BlurMaskFilter.Blur.

🌌 Gyroscope Parallax Effect (My personal favourite ❤): Add a dynamic depth effect where the shadow subtly shifts based on device orientation.

🌬️ Breathing Animation Effect: Create an engaging pulsating effect by animating the shadow's blur radius.

🚀 Easy to Use: Apply complex shadows with a simple and fluent Modifier chain.

💻 Compose Multiplatform Ready (Core Logic): Designed with multiplatform principles in mind (platform-specific implementations for features like gyro would be needed).

📱 Theme Friendly: Works seamlessly with light and dark themes.

Do checkout the project here 👉 https://github.com/StarkDroid/compose-ShadowGlow

A star ⭐ would help me know that crafting this was worth it.

If you feel like there's anything missing, leave it down below and I'll have it worked on.


r/JetpackComposeDev • • Sep 15 '25

Tool Create new projects with Ktor 3! Learn more

Thumbnail
gallery
6 Upvotes

Create asynchronous client and server applications. Anything from microservices to multiplatform HTTP client apps in a simple way. Open Source, free, and fun!

Latest release: 3.3.0

https://ktor.io/


r/JetpackComposeDev • • Sep 09 '25

Tutorial Jetpack Compose Spring Animation - Damping Ratio Demo

6 Upvotes

This demo showcases how different spring damping ratios influence motion in Jetpack Compose. You can interact with each card to see how the animation feels with:

  • Spring.DampingRatioNoBouncy (1f)

    • A settings toggle switch : should move smoothly without overshoot for a precise, professional feel.

  • Spring.DampingRatioLowBouncy (0.75f)

    • Expanding/collapsing a card in a dashboard : adds a subtle bounce that feels smooth but not distracting.

  • Spring.DampingRatioMediumBouncy (0.5f)

    • A floating action button (FAB) expanding into multiple action buttons : bounce makes it feel lively and engaging.

  • Spring.DampingRatioHighBouncy (0.2f)

    • A like button animation : big, playful bounce that feels fun and celebratory

Source Code


r/JetpackComposeDev • • Sep 06 '25

Tutorial Learn How to handle State in Jetpack Compose

Thumbnail
youtu.be
6 Upvotes

Learn how state flows through your app in Jetpack Compose and how the framework can automatically update to display new values.


r/JetpackComposeDev • • Aug 28 '25

Why New Small Business Should Balance Firebase RTDB + Firestore to Avoid Cost Surprises

6 Upvotes

Firebase Realtime Database(RTDB) handle everything. It works beautifully at first — instant sync, live updates, smooth UX. But for new business, this can turn into unwanted costs very quickly.

For a new business, that's an unexpected expense that eats into your budget.

✅ The Balanced Approach The most cost-effective way to use Firebase at scale is to balance RTDB and Firestore:

  1. Use RTDB for true real-time data

  • Chats, messages, live presence → keep them in RTDB.

  • Scope listeners to the smallest possible path.

  1. Use Firestore for static/relational data

  • Followers, following lists, likes, references → move these to Firestore.

  • Firestore charges per read, but you control when and how often you fetch.

  1. Move notifications to Cloud Functions

  • Instead of every client watching every change, trigger notifications server-side only when needed.

  • This cuts thousands of redundant reads.


r/JetpackComposeDev • • Aug 24 '25

Beginner Help Jetpack Compose preview slow to render

6 Upvotes

In Android Studio, the Jetpack Compose preview is not updating instantly. even with a good graphics card, it sometimes takes 10 to 20 seconds to refresh.

I expected it to render while typing, but it feels slower than the demo shown by google. do I need to enable any settings, or is everyone facing the same issue?


r/JetpackComposeDev • • Jul 31 '25

KMP FindTravelNow - Travel Booking App for Android & iOS (Kotlin Multiplatform)

Thumbnail
gallery
6 Upvotes

FindTravelNow is a modern, cross-platform travel application built using Kotlin Multiplatform and Compose Multiplatform. It allows users to search and book flights, hotels, and various types of transportation all from a single unified interface. The app shares a single codebase across Android and iOS for efficiency and maintainability.

Author: mirzemehdi

Source code


r/JetpackComposeDev • • Jul 27 '25

Tips & Tricks Jetpack Compose Follow best practices

Thumbnail
developer.android.com
6 Upvotes

Here are some real world performance best practices for Jetpack Compose with easy code examples

1️⃣ Avoid Expensive Work Inside Composables

Problem: Sorting or heavy calculations inside LazyColumn can slow down your UI.

❌ Don't do this:

LazyColumn {
    items(contacts.sortedWith(comparator)) {
        ContactItem(it)
    }
}

✅ Do this:

val sorted = remember(contacts, comparator) {
    contacts.sortedWith(comparator)
}

LazyColumn {
    items(sorted) {
        ContactItem(it)
    }
}

2️⃣ Use key in Lazy Lists

Problem: Compose thinks all items changed when order changes.

❌ This causes full recomposition:

LazyColumn {
    items(notes) {
        NoteItem(it)
    }
}

✅ Add a stable key:

LazyColumn {
    items(notes, key = { it.id }) {
        NoteItem(it)
    }
}

3️⃣ Use derivedStateOf to Limit Recompositions

Problem: Scroll state changes too often, triggering unnecessary recompositions.

❌ Inefficient:

val showButton = listState.firstVisibleItemIndex > 0

✅ Efficient:

val showButton by remember {
    derivedStateOf { listState.firstVisibleItemIndex > 0 }
}

4️⃣ Defer State Reads

Problem: Reading state too early causes parent recompositions.

❌ Too eager:

Title(snack, scroll.value)

✅ Deferred read:

Title(snack) { scroll.value }

5️⃣ Prefer Modifier Lambdas for Frequently Changing State

Problem: Rapid state changes trigger recompositions.

❌ Recomposition on every frame:

val color by animateColorAsState(Color.Red)
Box(Modifier.background(color))

✅ Just redraw:

val color by animateColorAsState(Color.Red)
Box(Modifier.drawBehind { drawRect(color) })

6️⃣ Never Write State After Reading It

Problem: Writing to state after reading it causes infinite loops.

❌ Bad:

var count by remember { mutableStateOf(0) }
Text("$count")
count++ // ❌ don't do this

✅ Good:

var count by remember { mutableStateOf(0) }
Button(onClick = { count++ }) {
    Text("Click Me")
}

✅ Notes

  • remember {} for avoiding unnecessary work

  • Use key in LazyColumn

  • Use derivedStateOf to reduce recompositions

  • Read state only where needed

  • Use lambda modifiers like offset {} or drawBehind {}

  • Never update state after reading it in the same composable.


r/JetpackComposeDev • • Jul 22 '25

UI Showcase Jetpack Compose TODO App - Clean MVI Architecture + Hilt, Retrofit, Flow (Full Source Code)

Thumbnail
gallery
6 Upvotes

Jetpack Compose TODO App - MVI Architecture

Hey developers

This is a TODO app built using Jetpack Compose following a clean MVI (Model-View-Intent) architecture - ideal for learning or using as a base for scalable production projects.

Tech Stack

  • Clean Architecture: UI → Domain → Data

  • Kotlin Flow for reactive state management

  • Hilt + Retrofit for Dependency Injection & Networking

  • Room DB (Optional) for local storage

  • Robust UI State Handling: Loading / Success / Error

  • Modular & Testable Design

Source Code

GitHub Repo: compose-todo-app-demo

Contributions & Feedback

Whether you're learning Jetpack Compose or building a production-ready app foundation, this repo is here to help.

Feel free to:

  • ⭐ Star the repo

  • 🍴 Fork it

  • 🐞 Open issues

  • 💬 Suggest improvements

Let’s build clean, reactive, and maintainable Android apps with Jetpack Compose in 2025


r/JetpackComposeDev • • Sep 14 '26

Which navigation bar should I use in my app?

Thumbnail
gallery
5 Upvotes

I've been working on building an Android app using M3 Expressive for quite some time now. I currently have two different styles of navigation bars, and I'm wondering which one is more practical to use and which truly captures the M3 Expressive feel.

The app is called Renev Medication and is designed to make receiving medication reminders easier; I plan to expand its functionality-for instance, by scheduling a follow-up reminder three hours after you take a dose. It's not comparable to a standard clock app, for example.


r/JetpackComposeDev • • Nov 07 '25

Tutorial How to combine effects to create interactive and engaging user experiences | Shadows In Compose | Jetpack Compose Tips

Thumbnail
youtu.be
5 Upvotes

Craft dynamic and expressive user interfaces with Shadows in Compose. Adhithya, a Staff Interaction Designer on Android, guides you through techniques to create everything from subtle highlights to how to layer and animate them.

Discover how to combine effects to create interactive and engaging user experiences.


r/JetpackComposeDev • • Oct 11 '25

Question What is the best way of learning compose?

5 Upvotes

I want to learn jetpack compose, currently I am following philip lackner's compose playlist. Apart from that what all things should i do so that my learning curve becomes smooth. Also what should be correct flow of learning android development?


r/JetpackComposeDev • • Aug 22 '25

KMP Is glassmorphism safe to use in production apps? KMP Haze or any library

5 Upvotes

I want to use glassmorphism effects in my app but I still have doubts about performance and possible heating issues on devices. Is it safe to use in production? Has anyone already tried this in your apps?

Please share your app if used glass effects or any suggestions I have planned to use https://chrisbanes.github.io/haze/latest/


r/JetpackComposeDev • • Aug 16 '25

Tips & Tricks How to Make a Shared Element Transition with Shape Morphing in Jetpack Compose | Jetpack Compose Tips

Thumbnail
youtu.be
5 Upvotes

Compose screens to feel fluid instead of just cutting from one to another, try shared element transitions with shape morphing

1. Setup

  • Add Navigation 3 (Animated Nav) + Compose Material 3.

  • Wrap your AppTheme (or top-level composable) in

SharedTransitionLayout {
   AppNavHost()
}

This gives us the scope for all shared transitions

2. Add a shared element

  • On your Take Photo button (cookie shape)

Modifier.sharedBounds(
   sharedContentState = rememberSharedContentState("photo"),
   animatedVisibilityScope = LocalNavAnimatedContentScope.current
)
  • Add the same key to the Camera screen container. Now they are “linked”

3. Switch to Reveal Pattern

Normally it just grows content → not nice
Add

.skipToLookaheadSize()
.skipToLookaheadPosition()

This makes the camera screen stay in place & only be revealed.

4. Add Shape Morphing

  • Pass in two shapes

    • Button → cookie (start)

    • Screen → rectangle (end)

  • Create a morph with progress

val progress by transition.animateFloat { state ->
    if (state == EnterExitState.Visible) 0f else 1f
}
val morph = Shape.morph(startShape, endShape)
  • Apply as clip overlay during transition

clipInOverlayDuringTransition = MorphOverlayClip(morph, progress)

5. Run

  • Run it → Button smoothly morphs to fullscreen Camera.

  • Works with predictive back too!

Full code sample available on GitHub


r/JetpackComposeDev • • Aug 15 '25

News Test on a fleet of physical devices with Android Device Streaming, now with Android Partner Device Labs [App Testing]

Thumbnail
gallery
5 Upvotes

Big news! Android Device Streaming is now stable, and Android Partner Device Labs have arrived in the latest Android Studio Narwhal Feature Drop.

What’s New?

  • Android Device Streaming is now stable.

  • Android Partner Device Labs now available in the latest stable release.

  • Test on real physical devices hosted in Google’s secure data centers.

Benefits

  • Test on latest hardware - including unreleased devices (Pixel 9 series, Pixel Fold, and more).

  • Wide device coverage - phones, foldables, multiple OEMs.

  • Boost productivity - no need to own every device.

Partner OEMs

Now you can test on devices from:

  • Samsung

  • Xiaomi

  • OPPO

  • OnePlus

  • vivo

  • And more coming soon!

How to Get Started

  1. Open Device Manager → View > Tool Windows > Device Manager.

  2. Click Firebase icon → log in to your Google Developer account.

  3. Select a Firebase project (billing enabled).

  4. Enable OEM labs in Google Cloud project settings.

Pricing

  • Free monthly quota of minutes for all devices.

  • Extra usage billed as per Firebase Pricing.


r/JetpackComposeDev • • Jul 22 '25

News Jetpack Compose Is the Future - Welcome to r/JetpackComposeDev

Post image
5 Upvotes

Jetpack Compose is Google’s modern UI toolkit for building beautiful, native Android apps - fast and with less code. It is the future of Android UI development, powered by Kotlin, and designed to simplify and accelerate your development process.

Whether you're building pixel-perfect designs, crafting reusable components, or transitioning from XML, Compose is the direction forward - officially backed and rapidly evolving. As the Android ecosystem shifts to Compose-first design patterns, now is the time to level up your skills.

About This Community

r/JetpackComposeDev is a dedicated space for developers who are passionate about mastering Jetpack Compose.

Here, you can:

  • Ask questions & get help from peers.

  • Share code snippets, UI samples, and full tutorials.

  • Post tips, tricks, tools, and news.

  • Get feedback on your designs and composables.

  • Explore the real-world use of Compose in production.

Whether you’re just starting out or already shipping Compose apps - this is your home.

Community Rules

To maintain a clean, helpful, and professional environment:

1. Be Respectful and Professional

Engage respectfully. No harassment, personal attacks, or discrimination. Constructive feedback only.

2. Must Be Relevant to Jetpack Compose

All content must directly relate to Jetpack Compose or modern Android UI using Kotlin. XML or cross-platform topics must be clearly tied to Compose use cases.

3. Value the Content, Not the Creator

Everyone can contribute – AI, beginners, or unknown devs. Don’t gatekeep or judge based on the author.

4. Show Research Effort

Avoid trivial or lazy questions. Read the official docs and search Stack Overflow first.

5. Keep Posts Generally Useful

Avoid overly specific debugging unless it helps others too. Share context, logs, and what you've tried.

6. Share Code, Not Just Apps

Don’t post apps just for promotion. Share implementation details or source code to teach others.

7. No Memes, Rants, or Low-Effort Posts

We’re here to build. Avoid meme posts, screenshots with no context, or emotional rants.

8. English Only, No Paywalls

All posts must be in English and accessible freely (no login, sign-up, or paywall content).

Post Categories (Use Post Flair)

Use the right post flair to help others discover content easily:

  • Tutorial - Step-by-step guides or long-form explanations.

  • Tips & Tricks - Bite-sized advice or patterns.

  • Beginner Help - Questions or topics for those new to Compose.

  • Question - For general or intermediate queries.

  • Discussion - Debates, opinions, community topics.

  • UI Showcase - Share your Compose UI and get feedback.

  • Composable Snippet - A cool function, animation, or layout snippet.

  • Tool - Libraries, dev tools, or utilities that help with Compose.

  • Promotion - ONLY if you share code, tutorial, or implementation details.

  • KMP - Kotlin Multiplatform topics only when they involve Jetpack Compose (or Compose Multiplatform).

Let’s Compose the Future - Together.

This is your space. Use it to grow, share, teach, and learn. Compose is still evolving - and so are we.

Join the movement. Ask questions. Share boldly. Learn together.

r/JetpackComposeDev Team


r/JetpackComposeDev • • Dec 26 '25

Question Where can I find inspiration/guides on how to use m3 expressive?

4 Upvotes

I'm trying to but google doesn't have enough documentation. Any ideas?


r/JetpackComposeDev • • Oct 23 '25

Question Compose Multiplatform Web: SVG Icon Loads Very Slowly (~10s delay)

4 Upvotes

I’m working on a Compose Multiplatform project targeting Android and Web. I built the UI, and everything works fine on Android, but on Web, a specific SVG icon I added seems to load very late (~10 seconds delay).

Here’s what I did:

  • Downloaded the SVG and added it to App/composeApp/src/commonMain/composeResources/drawable/iconname.xml

  • Tried displaying it with both:

 Icon(painterResource(Res.drawable.iconname), contentDescription = "icon")

and

Image(painterResource(Res.drawable.iconname), contentDescription = "icon")

Everything else renders instantly, even some Icons that are ImageVector, but this icon always appears after a noticeable delay on Web. It only lags on first load or hard reload (CTRL+Shift+R) in chrome.

Has anyone experienced this in Compose Multiplatform Web? Could this be related to SVG handling, resource loading, or something else in Compose Web?

Thanks in advance!


r/JetpackComposeDev • • Sep 29 '25

Tips & Tricks Proguard Inspections in Android Studio

Thumbnail
youtube.com
4 Upvotes

Now in Android Studio, Proguard Inspections will warn you about keeping rules that are too broad, helping you better optimize your app's size and performance.


r/JetpackComposeDev • • Sep 26 '25

Tutorial Learn how to manage keyboard focus in Compose

4 Upvotes

Keyboard focus management in Compose
Learn how to manage keyboard focus in Compose : https://developer.android.com/codelabs/large-screens/keyboard-focus-management-in-compose?hl=en#0