https://kotlinlang.org
Join Slack
Is there a way to make a `StateFlow` from a callback (the first state is queried and the callback is...
d

dave08

over 2 years ago
Is there a way to make a
StateFlow
from a callback (the first state is queried and the callback is just to listen for changes to that first state - but I need to unregister from the callback when the flow is cancelled...)? I know there's
stateIn
, but I'd rather do it w/o having to pass a coroutine context there...
d
c
g
  • 3
  • 39
  • 412
In multiplatform, how can I get the current language? I'm defining a CompositionLocalProvider that s...
l

Luke

over 1 year ago
In multiplatform, how can I get the current language? I'm defining a CompositionLocalProvider that supplies strings but I don't know how to check which language I should use. I know there is the resource library but I prefer having resources in Kotlin files
l
w
+2
  • 4
  • 4
  • 411
Hello. Please I am trying to achieve an overlapping effect in jetpack compose, but a precise one. I ...
s

shock 11

over 1 year ago
Hello. Please I am trying to achieve an overlapping effect in jetpack compose, but a precise one. I have tried to use Box with Alignments or negative padding values, and I still do not get the desired effect as I'm not entirely sure what rule governs this. I asked the question here and the picture is also attached to the question. Any help would be greatly appreciated please https://stackoverflow.com/questions/78754223/how-to-achieve-this-overlapping-effect-in-jetpack-compose
s
t
+2
  • 4
  • 46
  • 411
hi ! Has anyone interfaced `Apple CryptoKit` into a kmp library ? My research lead me to how to us...
a

Ahmed na

almost 2 years ago
hi ! Has anyone interfaced
Apple CryptoKit
into a kmp library ? My research lead me to how to use swift only code in kmp, Looking for already packaged lib 😄
a
j
  • 2
  • 5
  • 411
how to use "kotlin exposed" in spring boot??
h

Hamza GATTAL

about 2 years ago
how to use "kotlin exposed" in spring boot??
h
a
+2
  • 4
  • 4
  • 411
Hi everyone! I am trying to build the iosApp from my KMM project in xcode, but seeing this error: `...
s

Sayali N

over 2 years ago
Hi everyone! I am trying to build the iosApp from my KMM project in xcode, but seeing this error:
> Task :shared:compileKotlinIosSimulatorArm64 UP-TO-DATE
> Task :shared:linkPodDebugFrameworkIosSimulatorArm64
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld invocation reported errors
Has anyone seen this issue and can help me fix it?
✅ 1
s
p
j
  • 3
  • 8
  • 411
Is there something like ScrollView `fillViewPort` but for `LazyColumn` (or `Column`)? The point is t...
m

Michal Klimczak

over 4 years ago
Is there something like ScrollView
fillViewPort
but for
LazyColumn
(or
Column
)? The point is to do something like this.
m
a
n
  • 3
  • 6
  • 411
I'm trying the saveLayer and blendMode (I'm using this for the first time I've never used that befor...
k

Kazemihabib1996

over 5 years ago
I'm trying the saveLayer and blendMode (I'm using this for the first time I've never used that before even in the previous android UIToolkit). So I followed this tutorial that's originally written for flutter https://stackoverflow.com/a/59650400/4146943 and I ended up with this code in jetpack compose
@Composable
fun testBlending2(modifier: Modifier = Modifier) {

    val paint = remember { Paint() }


    Canvas(modifier = modifier, onCanvas = {
        save()
        val rect = Rect(0f, 0f, 100f, 100f)
        drawRect(rect, paint.apply { color = Color.Red })
        saveLayer(Rect.fromLTWH(0f, 0f, size.width.value, size.height.value), paint.apply { BlendMode.multiply })

        drawRect(
                rect.shift(Offset(20f, 20f)),
                paint.apply { color = Color.Blue }
        )
        restore()
        restore()
    })
}
It's supposed to be but it just produces this image:

https://i.stack.imgur.com/q3In0.png▾

What am I doing wrong?
👍 1
k
r
  • 2
  • 26
  • 411
What if I want to share string resources between Compose Multiplatform app (mobile, desktop, wasm) a...
a

Andrey Larionov

over 1 year ago
What if I want to share string resources between Compose Multiplatform app (mobile, desktop, wasm) and Ktor server? Can I do this with this method?
a
h
  • 2
  • 5
  • 410
Hi, I got that warning on my androidmanifest for all wear os activities 'set taskAffinity for wear a...
f

florent

over 2 years ago
Hi, I got that warning on my androidmanifest for all wear os activities 'set taskAffinity for wear activities to make them appear correctly in recents' is there for information about this?
f
y
  • 2
  • 6
  • 410
Previous164165166Next

kotlinlang

A modern programming language that makes developers happier.

Powered by