https://kotlinlang.org
Join Slack
Is there any plan to support edge-to-edge on iOS and Android platforms under Compose Multiplatform? ...
a

Armond Avanes

about 1 year ago
Is there any plan to support edge-to-edge on iOS and Android platforms under Compose Multiplatform? Or if there is any existing implementation/library, I'd like to know about it.
a
c
a
  • 3
  • 7
  • 1010
how are you using Detekt on multiplatform projects these days? I was hoping to find a <single task> ...
f

fred

over 2 years ago
how are you using Detekt on multiplatform projects these days? I was hoping to find a single task that would sweep my entire project but from what I see this doesn’t exist and is being tracked here, so the options I see are: • create this task myself (any directions on how I could do that?) • do something like this, it seems to work great (basically setting the module root to be the source so all source sets are considered) • run multiple tasks: ◦
detektMain
to sweep non-multiplatform stuff with type resolution ◦
detektMetadataMain
to sweep
commonMain
on all modules (found this one here) ◦
detektAndroidDebug
and
detektAndroidRelease
to sweep Android code in multiplatform modules ◦ …and how do I sweep iOS code in multiplatform modules? I’ve tried
detektMetadataIosMain
,
detektIosX64Main
,
detektIosArm64Main
and
detektIosSimulatorArm64Main
but they all seem to fail to find issues on code inside
iosMain
— should I file an issue or am I missing something? I have a minimum reproducible example here: https://github.com/tfcporciuncula/detekt-kmm-issue (this commit summarizes everything) • any other option?
👀 2
f
m
+2
  • 4
  • 6
  • 1010
Hello, what is the best “Compose way” to repeat an animation just a specific number of times? For in...
s

svenjacobs

over 2 years ago
Hello, what is the best “Compose way” to repeat an animation just a specific number of times? For instance I want to highlight a specific item on my screen by shortly flashing the background. Would the following (pseudo) code be okay or are there any better solutions?
enum class BackgroundState { Normal, Highlighted }

@Composable
fun Item() {
    var backgroundState by remember { mutableStateOf(BackgroundState.Normal) }
    val backgroundColor by animateColorAsState(
        targetValue = when (backgroundState) {
            BackgroundState.Normal -> Color.Transparent
            BackgroundState.Highlighted -> Color.Yellow
        },
        animationSpec = tween(),
    )

    LaunchedEffect(Unit) {
        delay(250)
        backgroundState = BackgroundState.Highlighted
        delay(250)
        backgroundState = BackgroundState.Normal
        delay(250)
        backgroundState = BackgroundState.Highlighted
        delay(250)
        backgroundState = BackgroundState.Normal
    }

    Box(modifier = Modifier.background(backgroundColor)) {
        Text("Hello World")
    }
}
Thanks for your help!
s
y
+3
  • 5
  • 13
  • 1009
What are the differences between HttpClient(CIO) and HttpClient(OkHttp) with regards to ktor-client...
b

Barry Fawthrop

about 3 years ago
What are the differences between HttpClient(CIO) and HttpClient(OkHttp) with regards to ktor-client not server? Thanks
b
c
a
  • 3
  • 4
  • 1009
Is there any uniform approach for scanning QR-codes on multiplatform? I need iOS/Android/Desktop JVM
j

jQrgen

over 1 year ago
Is there any uniform approach for scanning QR-codes on multiplatform? I need iOS/Android/Desktop JVM
j
a
+3
  • 5
  • 9
  • 1007
I'm getting this error when working with 2.0.20-RC2-1.0.24 on js target. See thread:
r

Robert Jaros

9 months ago
I'm getting this error when working with 2.0.20-RC2-1.0.24 on js target. See thread:
r
e
  • 2
  • 4
  • 1004
Has anyone here figured out how to get jacoco to ignore inline function coverage? I’m asking here si...
s

Steven Sherry

about 5 years ago
Has anyone here figured out how to get jacoco to ignore inline function coverage? I’m asking here since Arrow uses inline quite a bit (and is the cause of my uncovered inline woes) and I’m sure other people in this channel have run into it. I don’t really care if it’s “scalable”, we just have arbitrary test coverage metrics in our company and I need to massage out the lack of inline function coverage of the report that ends up getting consumed by sonarqube
s
m
+2
  • 4
  • 20
  • 1001
Hi all .. I have been getting this 404 error response when trying to return a serialized data class ...
c

Charles Maina

about 2 years ago
Hi all .. I have been getting this 404 error response when trying to return a serialized data class using kotlin serialization.
"Skipping response body transformation from HttpStatusCode to OutgoingContent for the POST /register request because the HttpStatusCode type is ignored. See [ContentNegotiationConfig::ignoreType]". Anyone knows how I can go about it? I have tried searching online first.
This is how I am installing content negotiation.
fun Application.configureSerialization() {
    install(ContentNegotiation) {
        json()
    }
}
c
a
a
  • 3
  • 7
  • 1000
One of the biggest downsides of Compose for me is the performance. Eventhough I have R8 enabled and ...
a

Aaron Waller

over 2 years ago
One of the biggest downsides of Compose for me is the performance. Eventhough I have R8 enabled and I’m running in release build (which is also a downside cause it takes hours to build and heats up my laptop) it is still a poor experience. HorizontalPager + LazyVerticalGrid with 3 columns = 10 FPS Same setup on XML = extremely fast.
➕ 2
a
z
+5
  • 7
  • 38
  • 1000
When I use AsyncImage from `coil` in a `lazyList` I see lags during scrolling because image needs so...
e

electrolobzik

about 1 year ago
When I use AsyncImage from
coil
in a
lazyList
I see lags during scrolling because image needs some time to load. Is it possible to somehow preload a couple of items in direction of scrolling to avoid that lags? I was not able to find any API for that.
e
u
+3
  • 5
  • 37
  • 998
Previous333435Next

kotlinlang

A modern programming language that makes developers happier.

Powered by