Mario Loncar
06/24/2025, 2:39 PMnika
06/25/2025, 11:40 AMEslam Hussein
06/25/2025, 1:10 PMModalBottomSheet
where:
• When partially expanded, it should have a fixed height (e.g. 200.dp)
• When fully expanded, it should wrap content or fill the screen
using material 3 version 1.3.+RE
06/25/2025, 1:51 PMAnnotatedString
, if you append text with a size larger than the line height, that line will not automatically become taller but will remain fixed.
How to fix? I want to insert inline LaTeX formulas by using appendInlineContent
, but it seems to be limited by the line height.eygraber
06/25/2025, 6:03 PMmartmists
06/25/2025, 8:04 PMMR3Y
06/25/2025, 9:54 PMonUserInteraction
method in the main activity and run that logic from there. This works for any composable as long as they are in the same activity window but somewhere deep in the hierarchy I have some dialogs that will be shown conditionally. Obviously this interception technique doesn't work with these Dialogs because they live in their own window.
Is there a way to achieve what I want globally?Nikhil Parab
06/26/2025, 11:44 AMLukasz Kalnik
06/26/2025, 12:11 PMSome street 1, 10000 MĂĽnchen / Altstadt-NordI want to display it in one line, if it fits. However when it doesn't fit, I want that it breaks at the first comma, so that e.g. the zip code is not in the "street" line, and separate from the city line. I don't want to use non-breaking spaces, because then if the zip code/city part is also longer than one line, it gets broken in the middle of the words.
Oleksandr Balan
06/26/2025, 2:39 PMsealed interface
as stable, even if all of its implementations are inferred as stable? đź§µLukasz Kalnik
06/26/2025, 3:21 PMText
composables inside a Column
(they cannot be in an annotatedString()
). How can I make sure there is still typographicaly correct vertical space between them?
Is there some API to get the line spacing from a TextStyle
?Mugunthan
06/26/2025, 8:29 PMLazyColumn
containing multiple `LazyRow`s in Jetpack Compose on low-spec devices, even in release mode with R8.
Issue
• Setup: LazyColumn
with 10 `LazyRow`s, each with 10–15 items.
• Items Approach:
â—¦ Loads fast but lags on initial scroll.
â—¦ Smooth after "warm-up" scroll.
â—¦ Memory leaks may occur after prolonged scrolling.
• For Loop with Column:
â—¦ Loads slowly, possible memory leaks during loading.
â—¦ Smooth scrolling after loading.
• XML RecyclerView: Smooth loading and scrolling, no lag.
• Optimizations Tried: Stable keys, `@Stable`/`@Immutable`, Coil, release mode with R8.
Example Code
@Composable
fun LazyColumnWithLazyRows() {
val rows = List(10) { RowItem(it, "Row $it") }
val itemsPerRow = List(10) { List(10 + it % 6) { RowItem(it, "Item $it") } }
LazyColumn {
items(rows, key = { it.id }) { row ->
Text(row.title, fontWeight = FontWeight.Bold)
LazyRow {
items(itemsPerRow[row.id], key = { it.id }) { RowItemView(it) }
}
}
}
}
Questions
1. Why does the initial scroll lag on low-spec devices?
2. How to achieve RecyclerView
-like smoothness in Compose?
3. Any optimizations to reduce initial lag and memory leaks?
Suggestions appreciated!Bam
06/27/2025, 12:58 PMGrigorii Yurkov
06/27/2025, 4:49 PMoffset {}
modifier that accepts lambda to skip straight to the placement stage, but no size {}
modifier so I can also skip recomposition entirely?krzysztof
06/27/2025, 9:14 PMursus
06/28/2025, 9:54 AMNavigation3
. do you see a way to adopt it incrementally? Or does it have to be an atomic change for all of the 100 screens in my app?Nathan Fallet
06/28/2025, 2:08 PMThierry Kh
06/29/2025, 11:15 AMDovydas
06/29/2025, 6:43 PMonClick = {
navController.navigate(topLevelRoute.route) {
popUpTo(navController.graph.findStartDestination().id) {
saveState = true
}
launchSingleTop = true
restoreState = true
}
}
The problem I have with this, is that whenever I go to a screen (even if I've visited it before), it gets recreated with a new viewmodel instance and all state is lost. From my understanding, saveState
argument should save the state to SaveStateHandle
? which I'm not using in those viewmodels. But isn't there a way to just move the already existing screen and viewmodel to the front when navigating to it again, therefore them not getting recreated.Christian Ricardo
06/29/2025, 7:04 PM./gradlew wasmJsBrowserDevelopmentRun
I can't right click on the web to inspect it
I found this issue, and I think this web page has the same problem https://passaporteaupair.com/ because I can't right click on it to inspect
Does anyone know why this happens and how I can fix it? I didn't find any information, and from what I read here it should be possible https://kotlinlang.org/docs/wasm-debugging.html#debug-your-kotlin-wasm-applicationkrzysztof
06/30/2025, 9:11 AMSlackbot
06/30/2025, 9:53 AMDekroo
06/30/2025, 8:08 PM@Composable
fun AppTheme(
darkTheme: Boolean = isSystemInDarkTheme(),
dynamicColor: Boolean = true,
content: @Composable() () -> Unit
) {
val colorScheme = when {
dynamicColor && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> {
val context = LocalContext.current
if (darkTheme) dynamicDarkColorScheme(context) else dynamicLightColorScheme(context)
}
darkTheme -> darkScheme
else -> lightScheme
}
MaterialTheme(
colorScheme = colorScheme,
typography = AppTypography,
content = content
)
}
---------------
Text(
text = qrCode,
modifier = modifier,
style = MaterialTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurface
)
Jonathan
06/30/2025, 9:25 PMComposables
inside of a custom Layout {}
?
I would like to animate the relative positions of child Composable
in my custom Scaffold Composable based the offset of an AnchoredDragState
. Essentially, I would like to slide my nav bar “out of the way” when a sibling Composable
is dragged.
I’ve got a POF working using a Box
the Modifier.offset { ... }
on my child Composables
and hardcoded sizes. I would like to be able to wrap this logic up in a custom Layout
and not have to rely on individual offset modifiers and hardcoded sizes. Previously, I tried building this by accessing the offset of a AnchoredDraggableState but dragging became erratic.
If anyone has any experience with this, any advice would be appreciated.Dovydas
07/01/2025, 6:56 AMBox
Background (modifier applied to this)
Content
When I set the background to be a shared element, it renders in the overlay and above the content during the transition. So I also set renderInSharedTransitionScopeOverlay
for the content, but now it loses it's navigation transitions. Therefore after that I also add animateEnterExit
on the content with the same transition. But that modifier has no context about the difference between pop and push transitions, so I lose my seperate pop transitions. And from there I don't know how to proceed further, my full code is in the thread.Tim Karagosian
07/01/2025, 12:43 PMRaymond
07/01/2025, 4:09 PMRaymond
07/01/2025, 4:09 PMmattinger
07/01/2025, 4:28 PMDevices.TABLET
is an error, as it's an older form of specifying the device configuration. AS fixes it by inlining the configuration:
@Preview(device = "spec:width=1280dp,height=800dp,dpi=240")
I can then add things like orientation=portrait
. This is all well and good, but i'd rather use the built in pixel_tablet
spec and have it rotated to portrait mode. However, i can't figure out if there's a way to do that and then apply landscape mode. The documentation on using these new definitions seems a bit scarce where i'm looking (and the autocomplete only shows pixel_5
in the new type of spec)
https://developer.android.com/develop/ui/compose/tooling/previews
Anyone have suggestions as to how to do this without a fully custom device specification, and/or any other documentation i might have missed?Colton Idle
07/02/2025, 12:56 AM