https://kotlinlang.org
Join Slack
Hey guys, I wrote a guide how to setup firebase on iOS and Android using KMP as I've struggle to fin...
h

Hristijan

about 1 year ago
Hey guys, I wrote a guide how to setup firebase on iOS and Android using KMP as I've struggle to find a guide online that helped me do that https://funkymuse.dev/posts/kmp-firebase/ Hope it helps you too
👍 4
👍🏻 1
h
a
+4
  • 6
  • 8
  • 889
Is it possible to set a height dynamically on a LazyRow based the largest child it will display?
c

czuckie

over 2 years ago
Is it possible to set a height dynamically on a LazyRow based the largest child it will display?
c
c
c
  • 3
  • 6
  • 889
I’m getting this error `androidx/compose/compiler/plugins/kotlin/ComposeComponentRegistrar has been ...
c

Charlie Tapping

about 2 years ago
I’m getting this error
androidx/compose/compiler/plugins/kotlin/ComposeComponentRegistrar has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0.
55 Being Java 11 and 61 being 17 (I guess the latest compose was compiled on a machine with 17) Now Gradle is running with Java 18 I’ve set the toolchain to use 18 with:
kotlin {
    jvmToolchain {
        languageVersion.set(JavaLanguageVersion.of(libs.versions.java.compile.version.get().toInt())) //compile = 18
        vendor.set(JvmVendorSpec.ADOPTIUM)
    }
}
I’ve set the kotlin compile tasks to output Java 11 bytecode:
tasks.withType<KotlinCompile>().configureEach {
    compilerOptions {
        jvmTarget.set(JvmTarget.fromTarget(libs.versions.java.bytecode.version.get())) bytecode = 11
    }
}
On AGP I configured the same
compileOptions {
    sourceCompatibility = JavaVersion.toVersion(libs.versions.java.bytecode.version.get().toInt())
    targetCompatibility = JavaVersion.toVersion(libs.versions.java.bytecode.version.get().toInt())
}

kotlinOptions {
    jvmTarget = libs.versions.java.bytecode.version.get()
}
I really don’t understand how I could be running Java 11 runtime, its like kapt is reading the jvmTarget as the runtime rather than the bytecode target?
c
h
  • 2
  • 13
  • 888
Hey, I'm using koin in an android compose app and pass some parameters to some view model. I assumed...
f

Fabian Vorholt

about 3 years ago
Hey, I'm using koin in an android compose app and pass some parameters to some view model. I assumed that the view model will be recreated every time the parameters change because the remember uses
parameters
as key in
ViewModelComposeExt
:
return remember(qualifier, parameters) {
        scope.getViewModel(qualifier, { owner }, parameters)
    }
But actually it isn't like that. It returns the same view model with old parameters. Is that behavior intended? Am I missing something?
👍 1
f
c
l
  • 3
  • 23
  • 888
Did anyone figure out how to configure JaCoCo in a KMM project? It started with the Compose for Desk...
s

Stefan Oltmann

about 4 years ago
Did anyone figure out how to configure JaCoCo in a KMM project? It started with the Compose for Desktop Template (from the Wizard), but it does not seem possible to activate JaCoCo if also the "android-library" plugin is applied. So is there no way to report code coverage to sonarqube via gradle in Multiplatform projects?
s
r
+3
  • 5
  • 24
  • 888
How can I apply BlendMode to composable? I know how to add it using canvas, but I want to apply it o...
p

Piotr Prus

almost 2 years ago
How can I apply BlendMode to composable? I know how to add it using canvas, but I want to apply it on composable. I am playing around with shaders and I do not want to add BlendMode
color_dodge
to blend this shader: https://www.shadertoy.com/view/MdjfRK into transparent background version. I want the blaks to disappear, but do not loose the details of color noise.
p
r
t
  • 3
  • 26
  • 886
It seems to be possible to get the new focus modifiers in an inconsistent state and the app will cra...
v

vide

over 2 years ago
It seems to be possible to get the new focus modifiers in an inconsistent state and the app will crash on next key press:
java.lang.IllegalStateException: Event can't be processed because we do not have an active focus target.
    at androidx.compose.ui.focus.FocusOwnerImpl.dispatchKeyEvent-ZmokQxo(FocusOwnerImpl.kt:171)
EDIT: I have a hypothesis on why this is happening. I think it's a compose bug. Will write explanation in 🧵 EDIT 2: Debugged the root cause and created a minimal repro and recorded a demo of the crash
😁 1
v
  • 1
  • 9
  • 885
is it possible to have a button that is pinned to the bottom of the screen (either via box alignment...
a

abbic

over 2 years ago
is it possible to have a button that is pinned to the bottom of the screen (either via box alignment or Column arrangement) when the content is not scrollable, but switch to scrolling along witht he rest of the content when there is enough content to scroll?
a
c
s
  • 3
  • 7
  • 884
What is the difference between an interface and a data class?
e

Eric Womer

over 2 years ago
What is the difference between an interface and a data class?
e
s
+2
  • 4
  • 9
  • 883
I wish compose multiplatform had better back handling for iOS. Most native iOS apps use a cupertino ...
d

Deep Patel

about 1 year ago
I wish compose multiplatform had better back handling for iOS. Most native iOS apps use a cupertino style navigation where if the user drags the screen horizontally (enough pixels), they are taken back to the previous screen. At the moment, I don’t think that’s available on the compose navigation api.
d
n
+4
  • 6
  • 8
  • 882
Previous474849Next

kotlinlang

A modern programming language that makes developers happier.

Powered by