eygraber
02/16/2023, 6:24 PMManuel Unterhofer
02/17/2023, 2:58 PMspierce7
02/17/2023, 10:29 PMid("org.jetbrains.compose")
kotlin("plugin.serialization")
Arjan van Wieringen
02/18/2023, 1:57 PMnativeCanvas
into a Bitmap during a drawWithContent
modifier, but readPixels
always returns false, and I don't know why:
drawContent()
val nativeCanvas = drawContext.canvas.nativeCanvas
val imageInfo = ImageInfo(
width = 1280,
height = 800,
colorInfo = ColorInfo(
colorType = ColorType.RGBA_8888,
alphaType = ColorAlphaType.PREMUL,
colorSpace = ColorSpace.sRGB
),
)
val bitmap = Bitmap()
if (!bitmap.setImageInfo(imageInfo)) {
println("Couldn't set imageInfo")
}
if (!bitmap.allocPixels()) {
println("Couldn't allocate pixels")
}
if (!nativeCanvas.readPixels(bitmap, 0, 0)) {
println("Couldn't read pixels") <-- this one returns false
}
abbic
02/18/2023, 2:24 PMimplementation(path: ':common')
abbic
02/18/2023, 2:26 PMabbic
02/18/2023, 2:28 PMOdinakachukwu Omaka-chukwu
02/18/2023, 6:21 PMadte
02/18/2023, 6:48 PMMario Javier Medina Cocom
02/18/2023, 11:59 PMs3rius
02/19/2023, 1:40 PMshared
, app-android
and app-desktop
modules. Is there any general consensus what is supposed to go into the androidMain
source-set of shared
vs what goes into app-android
directly?
My thoughts right now:
• Permission-handling logic: that might live in androidMain actually
• Anything that needs android-specific plugins like google-services probably won't work well outside app-main?
• Does it make sense to puts things into `shared`'s manifest file if used inside androidMain
? I assume shared
is basically treated as a library, so manifests should be merged.
Right now I'm trying to stuff everything into shared
and app-android
and app-desktop
are mostly just for bootstrapping the application.xxfast
02/20/2023, 10:25 AMnatpryce
02/20/2023, 10:50 AM姜尚
02/20/2023, 3:20 PM姜尚
02/21/2023, 2:29 AM姜尚
02/22/2023, 2:13 AMdarkmoon_uk
02/23/2023, 7:43 AMStateFlow
s using the new API collectAsStateWithLifecycle
on Android are well explained in this article.
alphabet yellow question For those of us developing for K *Compose/Multiplatform*; what's the most ergonomic way to achieve StateFlow
collection that has the benefits of collectAsStateWithLifecycle
on Android, while being able to reuse (mostly) the same View code on other platforms?Lucas
02/23/2023, 1:19 PMAbhinav
02/23/2023, 5:39 PMAbhinav
02/23/2023, 5:58 PMLucas
02/23/2023, 9:01 PMAlfred Jin
02/24/2023, 8:54 AMCru
02/24/2023, 4:34 PMCru
02/24/2023, 8:57 PMrobercoding
02/25/2023, 12:58 AMIcon(painter = painterResource("import.svg"), contentDescription = null)
It throws me an error because file is not found.
What am I doing wrong and what is the correct way to get this file path?Sebastian Kürten
02/25/2023, 9:08 AMabbic
02/25/2023, 2:16 PMYuchuan Gu
02/26/2023, 3:03 PMShubham Singh
02/27/2023, 2:32 AM姜尚
02/27/2023, 6:03 AM