Tolriq
10/21/2021, 6:07 PMModifier.weight(1f, fill = false)
Error:
java.lang.ClassCastException: java.lang.Float cannot be cast to java.lang.Boolean
at xxxxx.library.LiveLiterals$LibraryDestinationKt.Boolean$arg-1$call-weight$val-tmp3_modifier$fun-$anonymous$$arg-3$call-Row$fun-$anonymous$$arg-1$call-CompositionLocalProvider$fun-$anonymous$$arg-3$call-Column$fun-$anonymous$$arg-3$call-Row$fun-$anonymous$$arg-3$call-Box$fun-AlbumEntry(Unknown Source:31)
Is there something I miss in the stack trace?Tolriq
10/21/2021, 6:08 PMCompositionLocalProvider(LocalContentAlpha provides ContentAlpha.disabled) {
Row(modifier = Modifier.fillMaxWidth()) {
Text(
text = finalMediaItem.displayArtist,
maxLines = 1,
overflow = TextOverflow.Ellipsis,
style = MaterialTheme.typography.body2,
modifier = Modifier.weight(1f, fill = false)
)
Adam Powell
10/21/2021, 6:45 PMAdam Powell
10/21/2021, 6:45 PMTolriq
10/21/2021, 6:48 PMChuck Jazdzewski [G]
10/21/2021, 6:57 PMweight
parameter as a Boolean
somewhere. Try just editing the literal value of this parameter or the value of the fill
parameter.Tolriq
10/21/2021, 7:11 PMTolriq
10/21/2021, 7:19 PMChris Sinco [G]
10/21/2021, 11:49 PMTolriq
10/22/2021, 9:28 AMTolriq
10/22/2021, 9:31 AM@ExperimentalFoundationApi
public fun <T : Any> LazyGridScope.items(
lazyPagingItems: LazyPagingItems<T>,
itemContent: @Composable LazyItemScope.(value: T?) -> Unit
) {
items(lazyPagingItems.itemCount) { index ->
itemContent(lazyPagingItems[index])
}
}
Just removing the public
suffix trigger this crash but something like 25% of the time only.
And interestingly that function is not used anywhere in the app.