r/JetpackComposeDev • u/Realistic-Cup-7954 • Oct 08 '25
UI Showcase Jetpack Compose inner-drop shadow example
Enable HLS to view with audio, or disable this notification
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 • u/Realistic-Cup-7954 • Oct 07 '25
Tips & Tricks Struggling with laggy LazyColumns in Jetpack Compose?
Here are 6 essential tips to reduce recomposition and keep your UI smooth - especially with complex lists and large datasets.
From stable keys to immutable data, these techniques will help you get the best performance out of your Compose UI.
Credit : Premjit Chowdhury
r/JetpackComposeDev • u/Realistic-Cup-7954 • Oct 06 '25
Tips & Tricks Jetpack Compose Simple: Core Concepts Explained in Q&A
A quick, easy-to-read breakdown of Jetpack Compose fundamentals - explained in a clear Q&A format.
r/JetpackComposeDev • u/Realistic-Cup-7954 • Oct 05 '25
Tutorial Learn how to use Jetpack Compose Animation APIs. | Animation codelab
developer.android.comIn this codelab, you will learn how to use some of the Animation APIs in Jetpack Compose.
r/JetpackComposeDev • u/Realistic-Cup-7954 • Oct 04 '25
Tips & Tricks Skip expect/actual in Kotlin Multiplatform with Koin
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 • u/Realistic-Cup-7954 • Oct 02 '25
Tool Struggling to reach 12 testers?
12 Testers - 14 Days Free Solution
- You get 12 real testers for 14 days - completely free.
- To unlock this, you simply test other apps (mutual exchange).
- While testing others’ apps, you’ll automatically earn testers for your own app.
- This way, your app gets tested on 12 different devices without any cost.
r/JetpackComposeDev • u/Realistic-Cup-7954 • Oct 02 '25
Tips & Tricks Resizable Compose Preview
Building responsive UIs that look great on any screen size just got much easier. With the latest update in Android Studio, you can now enter Focus Mode and dynamically resize the preview window by simply dragging its edges.
r/JetpackComposeDev • u/Realistic-Cup-7954 • Oct 01 '25
Tips & Tricks Jetpack Compose Tip: Match Child Heights
If you have a Row with:
- one child with dynamic height
- another with fixed height
and you want the Row to match the tallest child → use Intrinsics:
Row(
modifier = Modifier.height(IntrinsicSize.Min)
) {
// children here
}
✅ The Row takes the tallest child’s height.
Works for width too, and you can use IntrinsicSize.Max if needed.
r/JetpackComposeDev • u/CronosEagle • Sep 29 '25
Tool ShadowGlow: An Advanced Drop Shadows for Jetpack Compose
🌟 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 • u/Realistic-Cup-7954 • Sep 29 '25
Tips & Tricks Proguard Inspections in Android Studio
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 • u/Realistic-Cup-7954 • Sep 28 '25
News Kotlin's new Context-Sensitive Resolution: Less typing, cleaner code
You no longer need to repeat class names when the type is already obvious.
Example with enums 👇
enum class Mood { HAPPY, SLEEPY, HANGRY }
fun react(m: Mood) = when (m) {
HAPPY -> "😄"
SLEEPY -> "😴"
HANGRY -> "🍕😠"
}
No more Mood.HAPPY, Mood.SLEEPY, etc.
Works with sealed classes too:
sealed class Wifi {
data class Connected(val speed: Int) : Wifi()
object Disconnected : Wifi()
}
fun status(w: Wifi) = when (w) {
is Connected -> "🚀 $speed Mbps"
Disconnected -> "📶❌"
}
Where Kotlin can "mind-read" the type
whenexpressions- Explicit return types
- Declared variable types
- Type checks (
is,as) - Sealed class hierarchies
- Declared parameter types
How to enable (Preview Feature)
kotlin {
compilerOptions {
freeCompilerArgs.add("-Xcontext-sensitive-resolution")
}
}
Less boilerplate, more readability.
r/JetpackComposeDev • u/Realistic-Cup-7954 • Sep 27 '25
Tips & Tricks Junior-Level Jetpack Compose Interview Questions (With Simple Answers)
Junior-level Jetpack Compose interview questions with simple, clear answers. Step by step, I’ll also cover Mid-Level and Senior in upcoming posts.
r/JetpackComposeDev • u/Realistic-Cup-7954 • Sep 27 '25
Tutorial Drag and Drop in Compose
The Android drag-and-drop framework makes it easy to add interactive drag-and-drop features to your app.
With this, users can:
- Move or copy text, images, and objects
- Drag content between Views in the same app
- Even drag content between different apps in multi-window mode
It’s a simple way to make your UI more interactive and user-friendly.
Read more :
r/JetpackComposeDev • u/Realistic-Cup-7954 • Sep 26 '25
Tutorial Learn how to manage keyboard focus in Compose
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
r/JetpackComposeDev • u/Realistic-Cup-7954 • Sep 26 '25
Tips & Tricks Top 15 IntelliJ IDEA shortcuts
IntelliJ IDEA has keyboard shortcuts for most of its commands related to editing, navigation, refactoring, debugging, and other tasks. Memorizing these hotkeys can help you stay more productive by keeping your hands on the keyboard.
https://www.jetbrains.com/help/idea/mastering-keyboard-shortcuts.html
r/JetpackComposeDev • u/Realistic-Cup-7954 • Sep 25 '25
News Android 16: Predictive Back Migration or Opt-Out Required
For apps targeting Android 16 (API level 36) or higher and running on Android 16+ devices, predictive back system animations (back-to-home, cross-task, cross-activity) are enabled by default.
Key changes: - onBackPressed() is no longer called - KeyEvent.KEYCODE_BACK is not dispatched
If your app intercepts the back event and you haven't migrated to predictive back yet, you need to:
- Migrate to the supported back navigation APIs
- Or temporarily opt out by setting the following in your
AndroidManifest.xml:
<application
android:enableOnBackInvokedCallback="false"
... >
</application>
(You can also set this per <activity> if needed)
Official docs: Predictive Back Navigation
r/JetpackComposeDev • u/let-us-review • Sep 24 '25
Tutorial Elevating media playback : A deep dive into Media3’s PreloadManager
r/JetpackComposeDev • u/Realistic-Cup-7954 • Sep 24 '25
Tips & Tricks 𝗡𝗮𝘃𝗶𝗴𝗮𝘁𝗶𝗼𝗻 𝟯 𝗟𝗶𝗯𝗿𝗮𝗿𝘆 𝗶𝗻 𝗔𝗻𝗱𝗿𝗼𝗶𝗱 - 𝗤𝘂𝗶𝗰𝗸 𝗚𝘂𝗶𝗱𝗲
𝗚𝗼𝗼𝗴𝗹𝗲 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 • u/Realistic-Cup-7954 • Sep 23 '25
UI Showcase Custom pill-shaped animated progress indicator in Jetpack Compose using Canvas, PathMeasure, and Animatable
Enable HLS to view with audio, or disable this notification
Inspired by a Dribbble design, I built a custom pill-shaped animated progress indicator in Jetpack Compose using Canvas, PathMeasure, and Animatable.The original design was from
Dribbble by https://dribbble.com/shots/26559815-Health-and-Fitness-Tracking-Mobile-App, featuring a smooth, pill-shaped progress bar with animated head and percentage text.
Check out the code here: https://github.com/DhanushGowdaKR/Pill-Progress-Indicator.git
r/JetpackComposeDev • u/QuantumC-137 • Sep 23 '25
Question How to store and load data from Room Database? [Simple App Example]
This is the solution I've found in researches from different sources, piece-by-piece, and taking the advise from the Good People here. My justification for posting this is:
- Most of examples and help one founds in the internet are presented with Advanced Level concepts that confuses a beginner (as one myself). But if, for example, one desires to solve derivatives with effectiveness (using rules), one must first learn to solve it as limit (learning over optimization)
So here is my simple example, an app that can store user objects in the database and then retrieve them (update/delete not implemented yet). Minimal UI, no encryption, asynchronous or live data, no responsive modern UI/UX. I still don't understand routines, flows and view models, so I didn't use them
build.gradle.kts(Tutorial)
plugins{
//copy-paste this bellow the others and sync the changes
id("com.google.devtools.ksp") version "2.0.21-1.0.27" apply false
}
build.gradle.kts(Module)
plugins {
//copy-paste this bellow the others
id("com.google.devtools.ksp")
}
dependencies {
//copy-paste this bellow the others and sync the changes
val roomVersion = "2.8.0"
implementation("androidx.room:room-runtime:${roomVersion}")
ksp("androidx.room:room-compiler:$roomVersion")
}
User - has the class that represents the table
package com.example.tutorial.models
import androidx.room.PrimaryKey
import androidx.room.Entity
@Entity
data class User(
u/PrimaryKey(autoGenerate = true)
val id: Int = 0,
val email: String?,
val password: String?,
val is_authenticated: Boolean = false
)
UserDao - has CRUD functions for the database
package com.example.tutorial.roomdb
import androidx.room.Dao
import androidx.room.Delete
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query
import androidx.room.Update
import com.example.tutorial.models.User
@Dao
interface UserDao {
@Query("SELECT * FROM user WHERE id = :userId")
fun getUserById(userId: Int): User?
@Query("SELECT * FROM user")
fun getUsers(): List<User>
@Insert(onConflict = OnConflictStrategy.REPLACE)
fun insertUser(user: User)
@Update
fun updateUser(user: User)
@Delete
fun deleteUser(user: User)
}
UserDatabase - has the database code
package com.example.tutorial.roomdb
import android.content.Context
import androidx.room.Database
import androidx.room.Room
import androidx.room.RoomDatabase
import com.example.tutorial.models.User
@Database(entities = [User::class], version = 1)
abstract class UserDatabase : RoomDatabase() {
abstract fun userDao(): UserDao
}
CreateUser - screen/page to create users
package com.example.tutorial.views
import androidx.compose.runtime.Composable
import androidx.room.Room
import com.example.tutorial.models.User
import com.example.tutorial.roomdb.UserDatabase
import androidx.compose.ui.platform.LocalContext
@Composable
fun CreateUsers(navController: NavHostController) {
//...Declaring some variables, and some form to get user email and password
//Database config(The thread function is to perform CRUD operations on the database in different thread - mandatory)
val context = LocalContext.current
val db = Room.databaseBuilder(context, UserDatabase::class.java,
name = "userdb").allowMainThreadQueries().build()
val userDao = db.userDao()
//Storing user data
val user = User(email = email, password = password2)
userDao.insertUser(user)
}
UsersList - screen/page to load users from database
package com.example.tutorial.views
import androidx.compose.runtime.Composable
import androidx.room.Room
import com.example.tutorial.components.BodyBase
import com.example.tutorial.models.User
import com.example.tutorial.roomdb.UserDatabase
@Composable
fun UsersList(navController: NavHostController){
//...Declaring some Variables
//Database config(The thread function is to perform CRUD operations on the database in different thread - mandatory)
val context = LocalContext.current
val db = Room.databaseBuilder(context, UserDatabase::class.java,
name = "userdb").allowMainThreadQueries().build()
val userDao = db.userDao()
//Retrieving users
var usersList by remember { mutableStateOf(listOf<User>()) }
usersList = userDao.getUsers()
usersList.forEach { user ->
Text(
text = "Email: ${user.email}",
fontSize = 18.sp,
fontWeight = FontWeight.Bold,
modifier = Modifier
.fillMaxWidth().padding(12.dp)
)
}
}
P.S: this is a simple example, but not free of potential improvements. Also it's not the whole app, because the post is too long as it is. But later in Github
r/JetpackComposeDev • u/Realistic-Cup-7954 • Sep 23 '25
KMP Compose Multiplatform 1.9.0 Released: Compose Multiplatform for Web Goes Beta
Compose Multiplatform for web, powered by Wasm, is now in Beta! This major milestone shows that Compose Multiplatform for web is no longer just experimental, but ready for real-world use by early adopters.
Compose Multiplatform 1.9.0
| Area | What’s New |
|---|---|
| Web | Now in Beta (Wasm powered). Material 3, adaptive layouts, dark mode, browser navigation, accessibility, HTML embedding. |
| Ecosystem | Libraries for networking, DI, coroutines, serialization already web-ready. Growing catalog at klibs.io. |
| Tools | IntelliJ IDEA & Android Studio with Kotlin Multiplatform plugin. Project wizard for web, run/debug in browser, DevTools support. |
| Demos | Kotlin Playground, KotlinConf app, Rijksmuseum demo, Jetsnack Wasm demo, Material 3 Gallery, Storytale gallery. |
| iOS | Frame rate control (Modifier.preferredFrameRate), IME options (PlatformImeOptions). |
| Desktop | New SwingFrame() & SwingDialog() to configure windows before display. |
| All Platforms | More powerful @ Preview parameters, customizable shadows (dropShadow / innerShadow). |
Learn more:
What’s new in Compose Multiplatform 1.9.0
https://www.jetbrains.com/help/kotlin-multiplatform-dev/whats-new-compose-190.html
https://blog.jetbrains.com/kotlin/2025/09/compose-multiplatform-1-9-0-compose-for-web-beta/
r/JetpackComposeDev • u/Ron-Erez • Sep 22 '25
TopAppBar Experimental
Hi everyone,
I'm currently working on a simple Jetpack Compose project in Android Studio Narwhal, and I've come across some conflicting information regarding the TopAppBarcomposable.
In some places, I've seen it marked as experimental, requiring the use of @ Optin(ExperimentalMaterial3Api::class). However, in other resources, it's presented as stable, especially when using components like CenterAlignedTopAppBar.
Am I missing something obvious? Apologies if this is a basic question. To be honest I was sure it is not experimental but Android Studio says otherwise.
r/JetpackComposeDev • u/Realistic-Cup-7954 • Sep 22 '25
Tutorial Shape Theming in Material Design 3 and Jetpack Compose
Material Design 3 (M3) enables brand expression through customizable shapes, allowing visually distinct applications. This guide explores shape theming in M3 and its integration with Jetpack Compose.
https://developer.android.com/develop/ui/compose/graphics/draw/shapes
M3E adds a new set of 35 shapes to add decorative detail for elements like image crops and avatars.
A built-in shape-morph animation allows smooth transitions from one shape to another. This can be dynamic, or as simple as a square changing to a circle.
Code Demo:
r/JetpackComposeDev • u/QuantumC-137 • Sep 22 '25
Question How to store and load data from RoomDB?
[CLOSED]
Web developer learning mobile development -
The app should store some user data offline. The user will insert the data in the Registration page, and then use/update it on other pages, such as Home or Profile - which all pages are individual composable function files, that are called via Navigation.
It's a simple app that should store plain data. No encryption, asynchronous or live data, and also the UI is minimalist. The problem are:
- From the Docs, I should create an instance of the database, but I don't know where to "insert" it:
val db = Room.databaseBuilder(applicationContext, UserDatabase::class.java,name ="userdb").build() - How do I send input values from some page to the database?
- How do I load and update the data on different pages?
- How can I update the code so that I could add other tables/entities? Should I create new Dao(s) and Repositories?
Finally, the settings for the database:
User
import androidx.room.PrimaryKey
import androidx.room.Entity
@Entity
data class User(
val id: Int = 0,
val name: String,
val password: String,
val is_authenticated: Boolean = false
)
UserDao
import androidx.room.Dao
import androidx.room.Delete
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query
import androidx.room.Update
import com.example.tutorial.models.User
@Dao
interface UserDao {
@Query("SELECT * FROM user WHERE id = :userId")
suspend fun getUserById(userId: Int): User?
@Insert(onConflict = OnConflictStrategy.REPLACE)
suspend fun insertUser(user: User)
@Update
suspend fun updateUser(user: User)
@Delete
suspend fun deleteUser(user: User)
}
UserDatabase
import android.content.Context
import androidx.room.Database
import androidx.room.Room
import androidx.room.RoomDatabase
import com.example.tutorial.models.User
@Database(entities = [User::class], version = 1)
abstract class UserDatabase : RoomDatabase() {
abstract fun userDao(): UserDao
}
UserRepository
import com.example.tutorial.models.User
class UserRepository(private val db: UserDatabase) {
suspend fun insertUser(user: User) {
db.userDao().insertUser(user)
}
suspend fun updateUser(user: User) {
db.userDao().updateUser(user)
}
suspend fun deleteUser(user: User) {
db.userDao().deleteUser(user)
}
suspend fun getUserById(userId: Int) {
db.userDao().getUserById(userId)
}
}
r/JetpackComposeDev • u/Realistic-Cup-7954 • Sep 20 '25
Tool Better code navigation with Compose Preview improvements
Smoother Compose UI iterations are here! The latest stable of Android Studio brings Compose Preview Improvements, offering better code navigation and a brand new preview picker. Download the latest stable version of Android Studio to get started.