sergio felipe de jesus gomes
01/05/2022, 2:29 PMmattinger
01/05/2022, 4:13 PMspierce7
01/05/2022, 4:32 PMNat Strangerweather
01/05/2022, 5:04 PMBrian Donovan
01/05/2022, 5:40 PMjava.lang.IllegalStateException: Vertically scrollable component was measured with an infinity maximum height constraints, which is disallowed. One of the common reasons is nesting layouts like LazyColumn and Column(Modifier.verticalScroll()). If you want to add a header before the list of items please add a header as a separate item() before the main items() inside the LazyColumn scope. There are could be other reasons for this to happen: your ComposeView was added into a LinearLayout with some weight, you applied Modifier.wrapContentSize(unbounded = true) or wrote a custom layout. Please try to remove the source of infinite constraints in the hierarchy above the scrolling container.
how to put a LazyColumn inside Column(Modifier.verticalScroll())YASAN
01/05/2022, 6:42 PMChris Johnson
01/05/2022, 8:35 PMSwipeToDismiss
and swipeable/draggable
and was wondering if there's a configuration I'm missing to completely disallow swiping in a certain direction? Currently I see we have in swipeable
a resistanceConfig that you can define. This would make it hard to swipe on a certain side, but not impossible.Filip Wiesner
01/06/2022, 7:32 AMremember { ... }
equal to remember(Unit) { ... }
?
Or does the Unit
key override the implicit key derived from call order? Am I just overthinking things?Paul Woitaschek
01/06/2022, 7:40 AMYves Kalume
01/06/2022, 9:58 AMmyanmarking
01/06/2022, 10:17 AMmyanmarking
01/06/2022, 12:35 PMvar isScrolling by remember {
mutableStateOf(lazyListState.isScrollInProgress)
}
LaunchedEffect(key1 = lazyListState){
snapshotFlow { lazyListState.isScrollInProgress }.collect {
isScrolling = it
}
}
AmrJyniat
01/06/2022, 4:10 PMNick
01/06/2022, 5:06 PMSlackbot
01/06/2022, 5:19 PMmyanmarking
01/06/2022, 9:55 PMStylianos Gakis
01/07/2022, 6:17 AMNapa Ram
01/07/2022, 7:21 AMSebastian Kürten
01/07/2022, 8:36 AMmutableStateOf()
and a background thread for potentially longer running tasks that deliver data and alter state variables. Naturally, sometimes buttons etc. also write to such state variables. Now we're wondering about thread safety and what kind of synchronization mechanisms we might need. I realize the state handling and snapshots do a lot of heavy lifting for us, but it would be really nice to read some documentation about that. I find next to nothing on that topic in the compose docs: https://developer.android.com/jetpack/compose/documentation We have found Zach's series "Compose state explained" https://dev.to/zachklipp/series/12895 and the articles there are very insightful. Still I'm wondering if there might be other "official" resources such as docs or references on those topics that we might have missed?rocketraman
01/07/2022, 9:13 AM@Composable
fun ElementScope<HTMLElement>.BlockChildLink(
span: BlockChildSpan,
markDefs: List<MarkDef>,
content: @Composable ElementScope<HTMLElement>.() -> Unit
) {
val link = span.marks.linkOrNull(markDefs)
if (link != null) {
A(href = link.href) {
content()
}
} else content()
}
but this always results in empty content if the link is null i.e. the content()
to the right of the elvis operator is ignored:
@Composable
fun ElementScope<HTMLElement>.BlockChildLink(
span: BlockChildSpan,
markDefs: List<MarkDef>,
content: @Composable ElementScope<HTMLElement>.() -> Unit
) {
span.marks.linkOrNull(markDefs)?.let { link ->
A(href = link.href) {
content()
}
} ?: content()
}
myanmarking
01/07/2022, 9:27 AM.then(if (isEnabled) Modifier.clickable { onItemClicked(index) } else Modifier)
Stylianos Gakis
01/07/2022, 9:28 AMBassam A.
01/07/2022, 10:34 AMmyanmarking
01/07/2022, 11:21 AMval MaterialTheme.brandColor: BrandColor
@Composable
@ReadOnlyComposable
get() = LocalBrandColor.current
and injected into the theme with CompositionLocalProvider. So in a composable, i can do MaterialTheme.brandColor.blue and it will resolve for light and dark. My problem: I used to resolve this colors in the viewMode, like using R.brand.blue and it was fine. In compose, i cannot do that, because it required a composable context. What can i do ?Tolriq
01/07/2022, 3:19 PMloloof64
01/07/2022, 4:10 PMLazyColumn
, how can I know if an item has been Long-clicked, and its index ?Neil
01/07/2022, 4:58 PMmattinger
01/07/2022, 6:31 PMSlackbot
01/07/2022, 7:04 PMColton Idle
01/08/2022, 1:26 AMColton Idle
01/08/2022, 1:26 AMFunkyMuse
01/08/2022, 3:06 PM