r/JetpackComposeDev • • Sep 03 '25

Tips & Tricks Android 16 - What’s new and what developers need to update

Thumbnail
gallery
26 Upvotes

Android 16 is here. Have you updated your apps to meet the new requirements?

Key changes: Edge-to-Edge layouts are now mandatory Predictive Back Gestures support Native library alignment (16KB → requires recompilation) Large screen limits removed → design adaptive UIs BODY_SENSORS permission split into granular health permissions Local network access now requires a runtime permission Plus: updates to text rendering, task scheduling, and Bluetooth Tips:

Watch your Play Console for warnings - they’ll guide you to required fixes. Use the Appdadz testing platform to get feedback from 12+ real testers before pushing updates.


r/JetpackComposeDev • • Aug 17 '25

KMP KMP Recipe App : This is a demo of Recipe App on Android, iOS, Web and Desktop. It has different features like Hero Animation, Staggered Animation and Gyroscopic effects.

Thumbnail
gallery
26 Upvotes

Recipe App built with Compose Multiplatform (KMP), targeting Android, iOS, Web, Desktop, and Android TV.

This is a demo project showcasing advanced UI features such as Hero Animation, Staggered Animation, Collapsible Toolbar, and Gyroscopic effects.

Design inspired by Roaa Khaddam & folk by SEAbdulbasit.

Getting Started Clone the repo: JetpackComposeDev/kmp-recipe-app


r/JetpackComposeDev • • Aug 12 '25

Tips & Tricks Most Common Android Architecture Interview Questions

Thumbnail
gallery
26 Upvotes

Architecture questions are a must in senior or intermediate android interviews, especially for banking, fintech, or enterprise apps

  • MVVM - How Android handles UI and state

  • ViewModel - Rotation-proof business logic manager

  • Clean Architecture - Separates UI, domain, and data

  • Repository Pattern - Your app’s data waiter

  • Use Cases - Applying the Single Responsibility Principle

  • StateFlow - A modern alternative to LiveData in Compose

  • UDF - One-way data flow that scales

  • MVVM vs MVP vs MVI - Choosing the right fit

which architecture are you using right now, MVVM, MVI, or something custom?


r/JetpackComposeDev • • Aug 12 '25

Open source AI first visual editor for Compose Multiplatform

26 Upvotes

https://github.com/ComposeFlow/ComposeFlow

I have open-sourced ComposeFlow, an AI-first visual editor for building Compose Multiplatform apps!

It's still in the early stages, but the core functionality is there. You can already:

  • Create and modify apps with an AI agent.

  • Refine your UI using a visual editor.

  • State Management: Visually manage your app's state with automatic code generation.

  • Firebase Integration: Seamlessly integrate with Firebase for authentication, Firestore, and other cloud services.

  • The generated apps are built on Compose Multiplatform, allowing them to run on Android, iOS, desktop, and the web.

How the visual editor works

The platform abstracts your app's project information into Kotlin data classes that represent the structure of your Compose application, such as the composable tree, app states, and screen-level states. This abstraction allows ComposeFlow to render a real-time preview and enables editing via a drag-and-drop interface. Each composable then knows how to render itself in the visual editor or export itself as Kotlin code.

How the AI agent integration works

The platform exposes every operation of the visual editor, such as adding a composable, as a JSON schema. The LLM understands these schemas as a set of tools and decides which tool calls are needed based on the user's question and the current project state.

I'd like you to give it a try and looking for feedback!


r/JetpackComposeDev • • Sep 01 '25

Tips & Tricks Kotlin Cheatsheet - Quick Guide for Developers

Thumbnail
gallery
25 Upvotes

Kotlin cheatsheet gives you a quick overview of essential syntax, tips, and tricks.

A handy reference to boost your Kotlin coding skills.


r/JetpackComposeDev • • Oct 28 '25

KMP Kotlin Multiplatform

Thumbnail
gallery
24 Upvotes

r/JetpackComposeDev • • Oct 08 '25

UI Showcase Jetpack Compose inner-drop shadow example

24 Upvotes

The flexibility of the drop and inner shadow modifiers in Compose is truly liberating. The joy of being free from manual boiler codes on canvas.

Android Developers #JetpackCompose #Kotlin #AndroidDevelopment #AndroidProgramming #AndroidX

Credit : Arda K


r/JetpackComposeDev • • Oct 04 '25

Tips & Tricks Skip expect/actual in Kotlin Multiplatform with Koin

Thumbnail
gallery
24 Upvotes

You don’t always need expect/actual for platform-specific code in Kotlin Multiplatform.

As projects grow, it can become harder to maintain. Using Koin modules provides a more flexible and scalable way to handle platform-specific dependencies while keeping your architecture clean.

Credit : Mykola Miroshnychenko


r/JetpackComposeDev • • Sep 24 '25

Tips & Tricks 𝗡𝗮𝘃𝗶𝗴𝗮𝘁𝗶𝗼𝗻 𝟯 𝗟𝗶𝗯𝗿𝗮𝗿𝘆 𝗶𝗻 𝗔𝗻𝗱𝗿𝗼𝗶𝗱 - 𝗤𝘂𝗶𝗰𝗸 𝗚𝘂𝗶𝗱𝗲

Thumbnail
gallery
24 Upvotes

𝗚𝗼𝗼𝗴𝗹𝗲 recently released 𝗡𝗮𝘃𝗶𝗴𝗮𝘁𝗶𝗼𝗻 𝟯 - a completely redesigned navigation library built specifically for 𝗖𝗼𝗺𝗽𝗼𝘀𝗲 that gives developers unprecedented control over app navigation.

𝗞𝗲𝘆 𝗛𝗶𝗴𝗵𝗹𝗶𝗴𝗵𝘁𝘀:

  • ✅ Own your back stack - Navigate by simply adding/removing items from a list

  • ✅ Built-in state persistence across configuration changes and process death

  • ✅ Adaptive layouts for multi-destination UIs (perfect for tablets/foldables)

  • ✅ Simplified Compose integration with reactive UI updates

  • ✅ Flexible animation system with per-destination customization

  • ✅ Scoped ViewModels tied to navigation entries

The library is currently in 𝗔𝗹𝗽𝗵𝗮, but the concepts and API design show Google's commitment to making 𝗖𝗼𝗺𝗽𝗼𝘀𝗲 𝗻𝗮𝘃𝗶𝗴𝗮𝘁𝗶𝗼𝗻 as intuitive as the rest of the 𝗖𝗼𝗺𝗽𝗼𝘀𝗲 𝗲𝗰𝗼𝘀𝘆𝘀𝘁𝗲𝗺.

Swipe through my 𝗰𝗮𝗿𝗼𝘂𝘀𝗲𝗹 below for a complete quick-start guide!


r/JetpackComposeDev • • Nov 24 '25

Tips & Tricks SharedPreferences vs DataStore - Why Android Developers Should Move Forward

Thumbnail
gallery
23 Upvotes

Most Android developers have used SharedPreferences at some point to store simple local data such as user settings, flags, or tokens.
But as modern apps become more reactive, scalable, and state-driven, SharedPreferences begins to fall short.

Jetpack DataStore is Google’s modern, efficient, and safer replacement for SharedPreferences.
It’s designed for predictable data flows, type safety, and smooth integration with Kotlin coroutines and Jetpack Compose.

Why SharedPreferences Falls Behind:
• Synchronous API that can block the main thread
• Risk of data corruption with concurrent writes
• No built-in support for reactive data updates
• Inconsistent behavior across devices

Why DataStore Is the Future:
• Fully asynchronous (coroutines-first)
• Type-safe with Proto DataStore
• Designed for reactive UIs and Flow-based data streams
• Handles data consistency and prevents corruption
• Better performance for modern multi-screen apps
• Recommended by Google for new Android projects

Moving to DataStore makes your app more stable, reactive, and scalable - especially when paired with Jetpack Compose and MVVM.

Let’s break down the differences and how to migrate effectively in the next slides.


r/JetpackComposeDev • • Nov 11 '25

Tips & Tricks Jetpack Compose Interview Q&A - Part 2 (Advanced)

Thumbnail
gallery
23 Upvotes

Jetpack Compose Interview Q&A - Part 2 (Advanced)
This deck covers:
* Advanced Compose concepts - LaunchedEffect, DisposableEffect, produceState

Navigation in Compose
* Scenario-based questions that test practical understanding, not just theory
If you’re preparing for interviews or improving your Compose mastery, check it out.


r/JetpackComposeDev • • Oct 11 '25

UI Showcase Building a Circular Carousel from a LazyRow in Compose

23 Upvotes

The idea is simple: make a LazyRow feel infinite and circular - smooth, performant, and responsive. After some work on graphicsLayer and a bit of trigonometry, it came together nicely.

Key features:
- Infinite scroll
- Auto snap
- Optimized recomposition
- Seamless performance on any device

GitHub: ComposePlayground/app/src/main/java/com/faskn/composeplayground/carousel/CircularCarouselList.kt at main · furkanaskin/ComposePlayground · GitHub

Credit : Furkan Aşkın


r/JetpackComposeDev • • Sep 13 '25

Tutorial Flow layouts | Jetpack Compose Tips

Thumbnail
gallery
23 Upvotes

Unlike the regular Row and Column, FlowRow and FlowColumn let your items automatically wrap to the next row/column when space runs out - super handy for dynamic content or multiple screen sizes!

https://www.youtube.com/watch?v=QaMjBZCXHiI

Features of flow layout

Flow layouts have the following features and properties that you can use to create different layouts in your app. (Ref the images)

  • Main axis arrangement: horizontal or vertical arrangement

  • Cross axis arrangement

  • Individual item alignment

  • Max items in row or column


r/JetpackComposeDev • • Sep 06 '25

Tutorial Getting Started with Android XR

23 Upvotes

Learn where to start with Android XR. Begin with modes and spatial panels, then move on to orbiters and spatial environments to create engaging immersive apps with Jetpack Compose XR.

Learn Android XR Fundamentals:Part 1 - Modes and Spatial Panels https://developer.android.com/codelabs/xr-fundamentals-part-1

Learn Android XR Fundamentals:Part 2 - Orbiters and Spatial Environments https://developer.android.com/codelabs/xr-fundamentals-part-2


r/JetpackComposeDev • • Aug 02 '25

UI Showcase Vegetable Order App UI with Jetpack Compose - Clean Android Grocery Design

Thumbnail
gallery
23 Upvotes

A simple and modern vegetable order app UI built using Jetpack Compose. It includes product listings, cart screen, and clean navigation. This project is great for learning Compose or starting your own grocery delivery app.

GitHub: VegetableOrderUI-Android


r/JetpackComposeDev • • Sep 11 '25

Tips & Tricks Kotlin Collections Explained: List, Set, and Map Made Simple

Thumbnail
gallery
22 Upvotes

Collections are at the heart of Kotlin programming. If you’re building apps, chances are you’ll rely heavily on List, Set, and Map. Here’s a quick guide


r/JetpackComposeDev • • Sep 07 '25

Tutorial Create a widget with Glance - Step-by-Step Codelab (Do & Don’t Tips)

Thumbnail
gallery
22 Upvotes

This codelab walks you through the process of creating an app widget for SociaLite.

Google’s official codelab shows you how to build a SociaLite app widget from scratch:
Create a widget with Glance (Codelab)


r/JetpackComposeDev • • Sep 01 '25

Tutorial How to use AnchoredDraggable in Jetpack Compose

22 Upvotes

Learn how to use AnchoredDraggable in Jetpack Compose to create interactive UI components that can be dragged or swiped between defined anchor points - making your UI more fluid and engaging.

  • Create AnchoredDraggableState → Stores offset & drag info

  • Set Initial State → Begin with a resting position

  • Define Anchor Points → Map states to pixel positions

  • Update via SideEffect → Keep anchors always in sync

  • Apply Modifier.anchoredDraggable → Detect drag gestures & deltas

  • Use Offset Modifier → Move the UI with requireOffset()

  • Auto-snap → Component settles to the nearest anchor after drag

  • End result → A swipeable, draggable UI with anchored precision


r/JetpackComposeDev • • Aug 26 '25

How to prevent Screenshots in Jetpack Compose

Post image
22 Upvotes

In some apps, you may want to block screenshots and screen recordings to protect sensitive data. Android provides this using FLAG_SECURE.

1. Block Screenshots for the Entire App

Apply the flag in MainActivity. This makes all screens secure.

import android.os.Bundle
import android.view.WindowManager
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent

class MainActivity : ComponentActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)

        // Prevent screenshots & screen recordings globally
        window.setFlags(
            WindowManager.LayoutParams.FLAG_SECURE,
            WindowManager.LayoutParams.FLAG_SECURE
        )

        setContent {
            MyApp()
        }
    }
}

When to use: Banking apps, health apps, or apps where every screen has sensitive information

2. Block Screenshots for a Specific Composable

If only certain screens (like Login, QR, or Payment pages) need protection, you can enable and disable the flag dynamically

import android.view.WindowManager
import androidx.activity.ComponentActivity
import androidx.compose.runtime.Composable
import androidx.compose.runtime.DisposableEffect
import androidx.compose.ui.platform.LocalContext


fun SecureLoginScreen() {
    val activity = LocalContext.current as ComponentActivity

    // DisposableEffect ensures the flag is set only while this Composable is active
    DisposableEffect(Unit) {
        // Enable screenshot blocking for this screen
        activity.window.setFlags(
            WindowManager.LayoutParams.FLAG_SECURE,
            WindowManager.LayoutParams.FLAG_SECURE
        )

        onDispose {
            // Clear the flag when leaving this screen
            activity.window.clearFlags(WindowManager.LayoutParams.FLAG_SECURE)
        }
    }

    // Your secure UI content here
}

When to use: Login screens, OTP entry, QR code pages, payment flow, or confidential document previews

Notes:

  • Doesn't stop physical photos with another device

  • On rooted devices, users might bypass FLAG_SECURE

  • Use with caution to balance security and user experience


r/JetpackComposeDev • • Aug 18 '25

Tips & Tricks Efficient Logging in Android: From Debug to Release Build

Thumbnail
gallery
22 Upvotes

Logging is very useful for debugging android apps - but it can also leak sensitive data or slow down your app if not used carefully

Here are some must-know logging tips & tricks

1️⃣ Use BuildConfig.DEBUG to Hide Logs in Release

Prevents logs from showing in production builds.

if (BuildConfig.DEBUG) {  
    // This log will run only in debug builds  
    Log.d("DEBUG", "This log will NOT appear in release builds")  
}

2️⃣ Centralize Logs in a Utility

Keep all logging in one place for easier management.

object LogUtil {  
    fun d(tag: String, msg: String) {  
        if (BuildConfig.DEBUG) Log.d(tag, msg)  
    }  
}

// Usage
LogUtil.d("MainActivity", "App started")

3️⃣ Show File + Line Number for Clickable Logs

Jump directly from Logcat to your code.

val stack = Throwable().stackTrace[0]  
Log.d("MyApp", "(${stack.fileName}:${stack.lineNumber}) ➔ Hello Logs!")  

4️⃣ Pretty Print JSON Responses

Make API responses more readable in Logcat.

fun logJson(json: String) {  
    if (BuildConfig.DEBUG) {  
        try {  
            Log.d("JSON", JSONObject(json).toString(2))  
        } catch (e: Exception) {  
            Log.e("JSON", "Invalid JSON")  
        }  
    }  
}

5️⃣ Debug Jetpack Compose Recompositions

Detect when your composable recomposes.

fun Counter(count: Int) {  
    SideEffect {  
        Log.d("Compose", "Recomposed with count = $count")  
    }  
    Text("Count: $count")  
}

6️⃣ Quick Performance Check

Measure how long code execution takes.

val start = System.currentTimeMillis()  
Thread.sleep(50)  
val duration = System.currentTimeMillis() - start  
Log.d("Perf", "Task took $duration ms")  

7️⃣ Strip All Logs in Release with ProGuard

Remove all logs in release for safety & performance.

-assumenosideeffects class android.util.Log {  
    public static int d(...);  
    public static int i(...);  
    public static int w(...);  
    public static int e(...);  
}

Notes

  • Use logs only in debug builds

  • Keep logs meaningful, not spammy

  • Always remove logs in release


r/JetpackComposeDev • • Aug 13 '25

Tips & Tricks MVI in Jetpack Compose - Make State Management Easy & Predictable

Thumbnail
gallery
22 Upvotes

Learn how to:

  • Understand why state management matters in Compose

  • Pick MVI vs MVVM (with real examples)

  • See MVI flow & rules in simple diagrams

  • Handle side effects (navigation, dialogs, toasts)

  • Follow step-by-step code you can copy

  • Avoid common mistakes + quick quiz

  • Build UIs that are predictable, testable, scalable


r/JetpackComposeDev • • Jul 26 '25

Tutorial Jetpack Compose Keyboard & IME Action Cheat Sheet - Complete Guide with Code Examples

Thumbnail
gallery
22 Upvotes

Jetpack Compose makes UI easier and smarter - and that includes choosing the right keyboard type and IME actions for each input.

Keyboard Types

Use keyboardType inside KeyboardOptions to control the keyboard layout:

OutlinedTextField(
    value = "",
    onValueChange = { },
    label = { Text("Enter text") },
    keyboardOptions = KeyboardOptions.Default.copy(
        keyboardType = KeyboardType.Text
    )
)

Available KeyboardType values:

KeyboardTypeDescription
TextStandard keyboard
NumberDigits only
PhonePhone dial pad
EmailIncludes @ and .
PasswordObscures input
DecimalNumbers with decimals
UriFor URLs
VisiblePasswordNon-hidden password

IME Actions

Control the bottom-right keyboard button using imeAction:

keyboardOptions = KeyboardOptions.Default.copy(
    imeAction = ImeAction.Done
)

Common ImeAction values:

ImeActionBehavior
DoneCloses the keyboard
NextMoves to the next input field
SearchExecutes search logic
GoCustom app-defined action
SendSends a message or form data
PreviousGoes to previous input field

Handle Keyboard Actions

Use keyboardActions to define what happens when the IME button is pressed:

OutlinedTextField(
    value = "",
    onValueChange = { },
    label = { Text("Search something") },
    keyboardOptions = KeyboardOptions.Default.copy(
        imeAction = ImeAction.Search
    ),
    keyboardActions = KeyboardActions(
        onSearch = {
            // Trigger search logic
        }
    )
)

Minimal Example with All Options

OutlinedTextField(
    value = "",
    onValueChange = { },
    label = { Text("Enter email") },
    modifier = Modifier.fillMaxWidth(),
    keyboardOptions = KeyboardOptions.Default.copy(
        keyboardType = KeyboardType.Email,
        imeAction = ImeAction.Done
    ),
    keyboardActions = KeyboardActions(
        onDone = {
            // Handle Done
        }
    )
)

✅ Tip: Always choose the keyboard and IME type that best fits the expected input.


r/JetpackComposeDev • • Dec 24 '25

News Kotlin 2.3.0 Released - Quick Summary

Post image
21 Upvotes

Kotlin 2.3.0 Released - Quick Summary

CategoryHighlights
LanguageMore stable & default features, unused return value checker, explicit backing fields, improved context-sensitive resolution
Kotlin/JVMJava 25 support
Kotlin/NativeBetter Swift export, faster release builds, C & Objective-C library import (Beta)
Kotlin/WasmFully qualified names, new exception handling (default), compact Latin-1 storage
Kotlin/JSExperimental suspend export, LongArray changes, unified companion object access
GradleGradle 9.0 compatibility, new generated sources API
Compose CompilerStack traces for minified Android apps
Standard LibraryStable time tracking, improved UUID generation & parsing
ToolingPerformance improvements & important fixes across platforms

📅 Released: December 16, 2025
✍️ Author: Alejandra Pedroza Marchena


r/JetpackComposeDev • • Aug 25 '25

Tutorial Quick guide to adding a modern splash screen in Jetpack Compose with the SplashScreen API - works on Android 5.0+ with smooth animations

Thumbnail
gallery
21 Upvotes

Learn how to implement a modern splash screen in Jetpack Compose.

  • Add Dependency: Add core-splashscreen:1.0.0 to app/build.gradle.kts.

  • Update Manifest: Apply Theme.App.Starting to application and main activity in AndroidManifest.xml.

  • Create Splash Theme: Set icon, background, post-theme in res/values/splash.xml.

  • Logo Drawable: Create layer-list in res/drawable/rectangle_logo.xml with logo, padding.

  • Icon Guidelines: Branded 200x80 dp; with BG 240x240 dp (160 dp circle); no BG 288x288 dp (192 dp circle); animated AVD ≤1000ms.

  • SplashViewModel.kt: ViewModel with MutableStateFlow, 3000ms delay.

  • MainActivity.kt: Install splash screen, use ViewModel to control display, set Compose UI.


r/JetpackComposeDev • • Dec 07 '25

Tips & Tricks Jetpack Compose Dev : Tips, Tricks & Android Development Guides - Join the Community

Post image
20 Upvotes

If you’re working with Jetpack Compose and want practical examples, real-world patterns, and consistent learning, this community is made for you.

We share high-quality content focused on modern Android development using Jetpack Compose
Now in Jetpack Compose Dev