https://kotlinlang.org
Join Slack
Hello! I am trying to load a layer-list drawable with this code: ```Image( painter = painterReso...
v

Vaios Tsitsonis

almost 4 years ago
Hello! I am trying to load a layer-list drawable with this code:
Image(
    painter = painterResource(id = someId),
    contentDescription = null
)
but i get this error:
Only VectorDrawables and rasterized asset types are supported ex. PNG, JPG
. I can load vector drawables so I suppose that I need to load layer-list differently... How is this possible?
v
m
+2
  • 4
  • 7
  • 1305
Will Apple let KMM succeed? Effectively, Multiplatform Compose and KMM will make iOS Developers, XCo...
i

Igor Bozin

almost 3 years ago
Will Apple let KMM succeed? Effectively, Multiplatform Compose and KMM will make iOS Developers, XCode or Swift obsolete. So, what is in it for them? And what guarantees the Kotlin Multiplatform approach will be possible to be used for development in 2-3 years?
i
c
+8
  • 10
  • 108
  • 1301
Hi People! How do you load image resources in your compose ios app ?
a

Anmol Verma

about 3 years ago
Hi People! How do you load image resources in your compose ios app ?
a
m
  • 2
  • 19
  • 1297
How can I disable `HorizontalPager` scroll (via `userScrollEnabled`) when the user started a `LazyCo...
s

ste

over 3 years ago
How can I disable
HorizontalPager
scroll (via
userScrollEnabled
) when the user started a
LazyColumn
scroll (and vice versa)? Do I need to write a complex
NestedScrollConnection
?
untitled.webm
s
c
  • 2
  • 11
  • 1295
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
  • 1292
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
  • 1292
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
  • 1289
```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
  • 1288
Is there any plan to support edge-to-edge on iOS and Android platforms under Compose Multiplatform? ...
a

Armond Avanes

almost 2 years 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
  • 1288
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
  • 1288
Previous272829Next

kotlinlang

A modern programming language that makes developers happier.

Powered by