https://kotlinlang.org
Join Slack
How to call rest API using kotlin multiplatform desktop app? Any one have Github demo?
p

Pragnesh Meniya

over 2 years ago
How to call rest API using kotlin multiplatform desktop app? Any one have Github demo?
p
j
m
  • 3
  • 2
  • 1285
How can you fill a row with two buttons: First button should take the max width, but there should be...
h

hfhbd

over 3 years ago
How can you fill a row with two buttons: First button should take the max width, but there should be another minified button.
@Composable
fun InfoButton(infoTest: String, button: @Composable (Modifier) -> Unit) {
    Row(modifier = Modifier.fillMaxWidth()) {
        Info(infoTest)
        button(Modifier.fillMaxWidth())
    }
}
This code renders the icon at the left side, I want to show them on the right side
h
p
c
  • 3
  • 9
  • 1283
How to convert a compose `ImageVector` to an Android `Bitmap` ? Note - need to use it for `CustomTab...
m

Mark

over 1 year ago
How to convert a compose
ImageVector
to an Android
Bitmap
? Note - need to use it for
CustomTabsIntent.Builder#setCloseButtonIcon
so not within a composable. https://developer.android.com/reference/androidx/browser/customtabs/CustomTabsIntent.Builder#setCloseButtonIcon(android.graphics.Bitmap)
m
e
  • 2
  • 5
  • 1282
Is it possible to make a sealed class parcelable? I’ve annotated the child classes with `@Parcelize`...
v

voben

over 5 years ago
Is it possible to make a sealed class parcelable? I’ve annotated the child classes with `@Parcelize`but when I add the annotation to the parent, I get an error saying “Parcelable should not be a ‘sealed’ or ‘abstract’ class”
v
b
  • 2
  • 2
  • 1281
Anyone knows how to create gradle JavaExec configuration for multiplatform project? ```tasks.create&...
t

Tomasz Krakowiak

almost 4 years ago
Anyone knows how to create gradle JavaExec configuration for multiplatform project?
tasks.create<JavaExec>("run") {
    classpath = //?
    mainClass.set("com.example.MainKt")
}
sourceSets
container is at this point empty.
configurations
container does not have
jvmMainRuntime
configuration.
t
h
e
  • 3
  • 3
  • 1280
How to prevent autoscroll on LazyColumn update if item index 0 is not visible?
k

K Merle

almost 4 years ago
How to prevent autoscroll on LazyColumn update if item index 0 is not visible?
k
f
+3
  • 5
  • 13
  • 1279
```Experimental context receivers are deprecated and will be superseded by context parameters. Pleas...
p

phldavies

over 1 year ago
>
Experimental context receivers are deprecated and will be superseded by context parameters. Please don't use context receivers. You can either pass parameters explicitly or use members with extensions.  
> 
> See new context parameters proposal: <https://github.com/Kotlin/KEEP/blob/context-parameters/proposals/context-parameters.md>. During the transition period, neither context receivers nor context parameters will be supported. This warning will become an error in future releases.
As a quick straw poll, how are most of us
context-receivers
lovers expecting to handle the migration? 1️⃣ go full ostrich, ignore it, stick to the last kotlin version that supports
context-receivers
and hope we can wait out the kotlin release that enables
context-parameters
2️⃣ stop using
context-receivers
for the time being, revert to
.bind()
et al, or where possible use
Raise<E>
as an extension receiver 😭 find a corner and cry until it all blows over
1️⃣ 5
😭 15
p
k
+3
  • 5
  • 5
  • 1278
Is there any plan to support edge-to-edge on iOS and Android platforms under Compose Multiplatform? ...
a

Armond Avanes

over 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
  • 1278
Hey there! Is there any way to get the file name in a Kotlin file? This functionality could be helpf...
m

Marc Reichelt

over 3 years ago
Hey there! Is there any way to get the file name in a Kotlin file? This functionality could be helpful with e.g. logging, where the other approaches have drawbacks: • need to manually define tag (manual, can be messed up when filename changes) • or: throw a full
Throwable()
, to only get the file / class name (performance issues) • or: using
reified
to get the class name (will print weird log tags when scope changes (e.g. it will print
CoroutineScope
in some instances))
m
e
+5
  • 7
  • 18
  • 1278
Hi, I am using Kotlin Multiplatform to build iOS/Android App. Recently I just updated to Gradle 8.0....
j

Jan

over 2 years ago
Hi, I am using Kotlin Multiplatform to build iOS/Android App. Recently I just updated to Gradle 8.0.0 due update of AndroidStudio from Electric Eel to Flamingo. Starting the iOS Project from AndroidStudio is working fine. Right now I do have a problem to run my iOS Project from Xcode (14.3). Building the ios framework fails with: "Android Gradle plugin requires Java 17 to run. You are currently using Java 11. ... Your current JDK is located in /Library/Java/JavaVirtualMachines/amazon-corretto-11.jdk/Contents/Home". I do not understand why XCode has a different JDK. In my .zshr file its defined like: export JAVA_HOME=/Applications/Android\ Studio.app/Contents/jbr/Contents/Home and if I check ./gradlew -v it says: Gradle 8.0 ------------------------------------------------------------ Build time: 2023-02-13 131521 UTC Revision: 62ab9b7c7f884426cf79fbedcf07658b2dbe9e97 Kotlin: 1.8.10 Groovy: 3.0.13 Ant: Apache Ant(TM) version 1.10.11 compiled on July 10 2021 JVM: 17.0.6 (JetBrains s.r.o. 17.0.6+0-17.0.6b802.4-9586694) OS: Mac OS X 13.0.1 aarch64 Why is gradle using a differnt JDK while running from xCode?
j
l
  • 2
  • 15
  • 1276
Previous272829Next

kotlinlang

A modern programming language that makes developers happier.

Powered by