John O'Reilly
12/10/2021, 10:59 AMAli Albaali
12/10/2021, 5:09 PMspierce7
12/10/2021, 7:23 PMsmallshen
12/11/2021, 8:04 AMjava.lang.IllegalStateException: Unhandled declaration! IrScriptImpl
When tries to run a compose application inside a kotlin scriptluen
12/11/2021, 1:13 PMd.medina
12/11/2021, 7:22 PMAli Albaali
12/11/2021, 8:05 PMLazyColum
? Let's say, I have Item1
and Item2
, I want to display one Item2
after every 5 items of Item1
.
My initial thought, is to make them inherit a single interface and handle them based on index. But is there any other way?spierce7
12/11/2021, 8:13 PMDirk Hoffmann
12/12/2021, 1:35 AMAyfri
12/12/2021, 3:53 PMColton Idle
12/13/2021, 4:26 PMsmallshen
12/13/2021, 4:32 PMSrSouza
12/13/2021, 5:22 PMhfhbd
12/14/2021, 9:18 AMrsktash
12/14/2021, 2:16 PMMichał Kalinowski
12/15/2021, 10:55 AMThomas
12/15/2021, 12:15 PMDragos Rachieru
12/15/2021, 3:34 PMrememberSaveable
on Desktop and Android, I have a sealed class that doesn't extend Serializable
or Parcelable
, the code works fine on Desktop, but does not work on Android.
How can I handle this? I was thinking of creating a custom saver for that, but serialization does not work with compose in the same module, so I'm trying to avoid that for now.simon ballantyne
12/15/2021, 4:59 PMColton Idle
12/16/2021, 8:18 AMclasspath("org.jetbrains.compose:compose-gradle-plugin:1.1.0-alpha1-dev527")
is available and is the latest, but I see on the github releases page that 1.0,1-rc2 with kotlin 1.6.10 support is available.Roshad Guerrier
12/16/2021, 10:12 PMRoshad Guerrier
12/16/2021, 10:14 PMsimon ballantyne
12/17/2021, 1:53 PMAyfri
12/17/2021, 2:39 PMDavid W
12/18/2021, 7:22 AMChristian Babsek
12/18/2021, 3:53 PM@Composable
fun ByteArrayImage(
image: ByteArray,
contentScale: ContentScale = ContentScale.Fit,
modifier: Modifier = Modifier
) {
val bitmap by derivedStateOf { SkiaImage.makeFromEncoded(image).toComposeImageBitmap() }
Image(
bitmap = bitmap,
contentDescription = null,
contentScale = contentScale,
modifier = modifier.fillMaxSize()
)
}
It results in
Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Failed to Image::makeFromEncoded
at org.jetbrains.skia.Image$Companion.makeFromEncoded(Image.kt:139)
at de.babsek.condocs.desktop.composelib.ByteArrayImageKt$ByteArrayImage$bitmap$2.invoke(ByteArrayImage.kt:19)
at de.babsek.condocs.desktop.composelib.ByteArrayImageKt$ByteArrayImage$bitmap$2.invoke(ByteArrayImage.kt:19)
at androidx.compose.runtime.snapshots.Snapshot$Companion.observe(Snapshot.kt:1798)
at androidx.compose.runtime.DerivedSnapshotState.currentRecord(DerivedState.kt:117)
at androidx.compose.runtime.DerivedSnapshotState.getDependencies(DerivedState.kt:172)
at androidx.compose.runtime.CompositionImpl.recordReadOf(Composition.kt:587)
at androidx.compose.runtime.Recomposer$readObserverOf$1.invoke(Recomposer.kt:792)
at androidx.compose.runtime.Recomposer$readObserverOf$1.invoke(Recomposer.kt:792)
at androidx.compose.runtime.DerivedSnapshotState.getValue(DerivedState.kt:160)
Any ideas? Thank you very much in advance 🙂Waqas Tahir
12/18/2021, 4:31 PMAntonio Cardona
12/20/2021, 1:51 PMDavid W
12/21/2021, 12:40 AMRow(modifier) {
Box(
modifier = Modifier
.width(24.dp)
.fillMaxHeight()
.background(color = Color.Blue)
)
Text(modifier = Modifier.align(Alignment.CenterVertically), text = "Theme")
}
sonder-joker
12/21/2021, 7:30 AMsonder-joker
12/21/2021, 7:30 AM