zalewski.se
10/21/2025, 9:17 AMLazyColumn animates its size (e.g., using .layout modifier), Iām noticing the item shifts vertically instead of staying anchored in the viewport. For example, if an item is centered, Iād like it to expand/collapse āin placeā from that center point. Instead, the scroll position seems to anchor to the top (or bottom?) of the item, causing it to shift.
Is there a recommended way to keep an itemās visual position stable in the viewport while its size animates within a LazyColumn?jermainedilao
10/21/2025, 1:14 PMsuika
10/22/2025, 4:39 AMsetContent {
var active by remember { mutableStateOf(true) }
Box {
ReusableContentHost(active) {
val innerData = remember { mutableStateOf("Za") }
}
}
val outerData = remember { mutableStateOf("Zb") }
val composition = currentComposer.composition
LaunchedEffect(active) {
// !!! When active changes from true to false, the Za stored in the slottable still remains and has not been cleaned up.
// Group(25) key=207, nodes=0, size=2 aux=false, slots=[86: false]
// Group(26) key=-1685893985, nodes=0, size=1, slots=[87: Ļ(value=Za]
composition.printSlotTable()
}
Box(
Modifier
.fillMaxSize()
.clickable {
active = !active
Log.e("clickable", "$active")
}) { }
}efemoney
10/22/2025, 9:18 AMPainter using a Brush (eg gradients and other shaders)?
I am thinking to use drawWithContent but the issue is that I have this chain:
Modifier
.drawWithContent(...) // <- I want to tint/blend *only* the painter but this will tint/blend everything underneath
.paint(painter, ...)
.otherContentOrOverlay()
.(...)Mark
10/22/2025, 2:37 PMval link = LinkAnnotation.Clickable(
tag = tag,
linkInteractionListener = linkInteractionListener,
)
withLink(link) {
...
}
in compose 1.9.0 (and earlier) there is no coloring or underscore, but now in 1.9.1 there are both. To workaround this I do:
val link = LinkAnnotation.Clickable(
tag = tag,
styles = TextLinkStyles(),
linkInteractionListener = linkInteractionListener,
)
withLink(link) {
...
}
so that no styling is applied.
Are these two samples supposed to behave differently?Tower Guidev2
10/22/2025, 4:17 PMJonathan
10/23/2025, 2:55 AMNavigableSupportingPaneScaffold following the guide found here? I've copied and pasted the code; only change I've made is to add Gray and light Gray background. Try as I might I cannot get the scaffold to behave as I expect, when running on a phone (portrait) only a single pane is displayed at once. What I'm seeing testing on an Pixel 9 Pro XL (emulator as well) is both panes are visible and vertically stacked. The scaffold behaves correctly on tablets.
I'm using the the following dependency versions:
composeBom = "2025.10.01"
adaptiveVersion = "1.2.0" // adaptive libraries
Has anyone run into this issue before?wwalkingg
10/23/2025, 6:51 AMBox(modifier = Modifier.fillMaxSize().background(Color.Blue)) {
Popup(
properties = PopupProperties(
clippingEnabled = false,
)
) {
Box(
modifier = Modifier
.size(10000.dp) // After failing to use fillMaxSize, a particularly large value was set.
.background(Color.Red),
)
}
}
However, the result turned out to be strange - it's not long enough. The blue part indicates the missing section of the popup. What should I do?thedroiddiv
10/23/2025, 8:03 AMJonas
10/24/2025, 7:38 PMnavigator.scaffoldState.currentState.secondary but it is always hidden, even tho the support pane is expanded or the main content atm.
Context: I am using CMP | adaptive versions: 1.2.0-beta01Alex Styl
10/25/2025, 5:54 AMAlex Styl
10/25/2025, 10:16 AMNestedScrollConnection events (see 1st video)
⢠On Desktop however, I don't receive any events when i overscroll (see video in š§µ).
I need this to be consistent because I am building bottom sheets and users cannot currently collapse them on desktop using the mousewhee/trackpad. The current behavior is so weird for UX and doesn't feel I (the dev) need to handle this a different way.
If this somehow a limitation of the platform, the web platform (Compose) handles it the same way. But on macs, desktop lists do bounce (overscroll effect) and websites (html) bounce as well.iamthevoid
10/25/2025, 5:17 PMMartin Noga
10/25/2025, 5:33 PMSunil Kumar
10/26/2025, 11:06 AMColton Idle
10/27/2025, 6:38 PMeygraber
10/27/2025, 8:16 PMAnnotatedString.fromHtml vs a String or AnnotatedString(String)?Max
10/27/2025, 9:23 PMKyant
10/28/2025, 7:50 AMBrush a sealed class? I can't customize it... Any way to hack the compose function to support other color spaces everywhere?
internal fun NativePaint.setNativeColor(value: Color) {
this.color = value.toArgb()
}Sudarshan
10/28/2025, 9:59 AMcomposeResources to resources. I followed the official documentation and updated my build script accordingly, but Iām now facing a runtime exception. More details are shared in the thread.Jonas
10/28/2025, 12:05 PMOutlinedTextField ;ursus
10/28/2025, 9:32 PMursus
10/29/2025, 2:12 PM@Composable
private fun Link(
modifier: Modifier,
text: String,
isQuiet: Boolean = false, <------
isSecondary: Boolean = false, <------
isSmall: Boolean = false, <----------
onClick: () -> Unit
) {
...
}
How do you deal with creating variants of composables? I'd naturally expect to these be a separate composables
however in this case, its a combination, i.e. I'd have to end up with
LargeLoudPrimaryLink
LargeQuietPrimaryLink
...
all the combinations -- which seems not idealJorge DomĆnguez
10/29/2025, 4:34 PMAndroidViewBinding when hosting different fragments across two screens, hopefully someone here will be able to help me.
In Screen A, I host FragmentA, and in Screen B, I host FragmentB, both are instances of the same fragment class. Even though I use the same composable function, each one is hosted in a different FragmentContainerView (I handle this by passing a bindingFactory lambda to AndroidViewBinding). When navigating from Screen A ā Screen B, everything works fine: FragmentManager properly removes FragmentA before showing FragmentB. However, when navigating back from Screen B ā Screen A, their lifecycles seem to overlap: `AndroidViewBinding`ās onRelease from Screen B is called after the factory from Screen A. This ends up replacing FragmentA with FragmentB on Screen A š§µDoug McCluer
10/29/2025, 8:14 PM@Preview annotated function?Nathan Fallet
10/30/2025, 8:46 AMXu Moria
10/31/2025, 5:51 AMLazyColumn inside HorizontalPager. When LazyColumn is scrolled by the user and enters the Fling state after the user's finger leaves the LazyColumn, the duration of this Fling is determined by FlingBehavior. However, when the Fling is in progress, the user's attempt to swipe horizontally on the HorizontalPager is completely blocked. This results in a poor UX experience. Is there any way to solve this? In ScrollingLogic, Offset.singleAxisOffset() completely discards the value in the other direction. Shouldn't it be that scrolling in one direction blocks the other direction, while during Fling, the other direction should be allowed?lakakhara
10/31/2025, 3:36 PMIterable<T>.sumOf(selector: (T) -> Dp): Dp but for some reason compiler want to use it even for other types like Int and Double. I added annotation OverloadResolutionByLambdaReturnType that if I got it right should alter preference, but it doesn't.
@OptIn(ExperimentalTypeInference::class)
@OverloadResolutionByLambdaReturnType
@JvmName("sumOfDp")
inline fun <T> Iterable<T>.sumOf(selector: (T) -> Dp): Dp {
var sum: Dp = 0.dp
for (element in this) {
sum += selector(element)
}
return sum
}
I know that I can just sum Dp.value.toDouble() but I want to know where the problem ismaarten ha
10/31/2025, 9:52 PMdleuck
11/01/2025, 12:16 AM