https://kotlinlang.org
Join Slack
There doesn’t seem to exist a CompositionLocal for `Locale` in compose right? I can see <Locale> is ...
s

Stylianos Gakis

almost 3 years ago
There doesn’t seem to exist a CompositionLocal for
Locale
in compose right? I can see Locale is there, which only gives you a way to fetch the locale, not to update it, and looking at the implementation it doesn’t seem to use the
AppCompatDelegate.setApplicationLocales
aka the Per-App Language Preferences API. Oh and also it doesn’t give a java.util.Locale so there’s that. Am I missing something here? How do you folks typically fetch the proper locale in your composables aside from just passing it down the chain all the way through?
s
e
a
  • 3
  • 9
  • 495
Hey ! What order plugins get called if there are multiple plugins performing operations on one phas...
s

Satyam Agarwal

about 3 years ago
Hey ! What order plugins get called if there are multiple plugins performing operations on one phase ? For example on call setup phase (
on(CallSetup)
) I have three different plugins registered. What is the execution strategy ?
s
a
  • 2
  • 3
  • 495
in IOS how `Dispatcher.Main` is working ? is it safe or only `Dispatcher.Default` should be used
p

pers

almost 2 years ago
in IOS how
Dispatcher.Main
is working ? is it safe or only
Dispatcher.Default
should be used
p
j
+3
  • 5
  • 13
  • 493
Has anyone tried building for Compose/Desktop using JDK21 and Proguard? It seems like the Compose pl...
m

Mike Dawson

almost 2 years ago
Has anyone tried building for Compose/Desktop using JDK21 and Proguard? It seems like the Compose plugin uses proguard 7.2, but proguard 7.4 is required for JDK21 support. As per the version docs, JDK17 and above is supposed to be supported.
m
o
+2
  • 4
  • 29
  • 493
I am trying to mock the ```any&lt;File&gt;().outputStream()``` I am trying this ```val mockOs = mock...
r

Ravin Jain

about 4 years ago
I am trying to mock the
any<File>().outputStream()
I am trying this
val mockOs = mockk<FileOutputStream>()
mockkStatic("kotlin.io.FilesKt__FileReadWriteKt")
mockkStatic(Files::class)
val resultFile = mockk<File>()
every { resultFile.path } answers {"somepath"}
every { any<File>().outputStream() } returns mockOs
But always gets this error
(No such file or directory)
java.io.FileNotFoundException:  (No such file or directory)
	at java.base/java.io.FileOutputStream.open0(Native Method)
	at java.base/java.io.FileOutputStream.open(FileOutputStream.java:298)
	at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:237)
	at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:187)
Any idea ?
r
m
+2
  • 4
  • 11
  • 493
Hi all. How can I create a List with initial capacity in Kotlin similar to Java? It seems the mutabl...
d

dineshbob

over 8 years ago
Hi all. How can I create a List with initial capacity in Kotlin similar to Java? It seems the mutableListOf method only has elements parameter.
d
v
+2
  • 4
  • 20
  • 493
iOS native tab bar with liquid glass effect on a Compose Multiplatform app, no Swift code needed jus...
m

mohamed rejeb

6 months ago
iOS native tab bar with liquid glass effect on a Compose Multiplatform app, no Swift code needed just Compose and Kotlin. Adaptive bottom bar will be added to Calf library soon as well as other liquid glass components kodee loading
Screen Recording 2025-06-10 at 5.54.49 PM.mov
kodee happy 15
kodee loving 11
🤩 4
K 21
🔥 14
cmp 43
m
m
+2
  • 4
  • 3
  • 492
Will KMP support HarmonyOS in the future?
z

zfan93

almost 2 years ago
Will KMP support HarmonyOS in the future?
z
w
  • 2
  • 2
  • 492
I have a kotlin fun defined in a KMP project with an Int paramter - ```fun getUser(userId: Int) {}``...
c

Christopher Mederos

about 2 years ago
I have a kotlin fun defined in a KMP project with an Int paramter -
fun getUser(userId: Int) {}
However, when I try to use this function in swift, I'm getting a type error -
Cannot convert value of type 'Int?' to expected argument type 'KotlinInt?'
Presumably I'm missing a step or config here? I'd assume that KMP magic handles the Int implementation in each platform without me having to write any additional mapping?
c
p
  • 2
  • 2
  • 492
When I update my Kotlin MPP to `1.2.0-beta02` I get a sync error ```&gt; Failed to notify project e...
e

enighma

about 3 years ago
When I update my Kotlin MPP to
1.2.0-beta02
I get a sync error
> Failed to notify project evaluation listener.
   > Could not create task ':android:compileDebugAndroidTestKotlin'.
      > Cannot invoke "String.trim()" because "in" is null
   > KotlinJvmAndroidCompilation with name 'debugAndroidTest' not found.
Interestingly it worked without a hitch on a desktop only project, but the gradle files look a bit different. Should I be able to use this version in a MPP project?
e
h
r
  • 3
  • 6
  • 492
Previous132133134Next

kotlinlang

A modern programming language that makes developers happier.

Powered by