https://kotlinlang.org
Join Slack
HorizontalPager continues the fling from horizontal LazyRow. This is apparently Expected behavior bu...
m

Michal Klimczak

about 4 years ago
HorizontalPager continues the fling from horizontal LazyRow. This is apparently Expected behavior but it differs from traditional android views and also feels really bad. Anyone knows how to work around it? Relevant github issue: https://github.com/google/accompanist/issues/347#event-4607690257
m
c
+4
  • 6
  • 28
  • 1132
Does anybody here use KotlinxSerialization with Retrofit?
c

Chetan Tuteja

about 4 years ago
Does anybody here use KotlinxSerialization with Retrofit?
c
w
  • 2
  • 9
  • 1132
(I know it's more a Jackson than a Kotlin question, but I hope someone might have an answer anyway)....
n

nkiesel

about 3 years ago
(I know it's more a Jackson than a Kotlin question, but I hope someone might have an answer anyway). I have a line `val jackson: YAMLMapper = YAMLMapper.builder().addModule(KotlinModule()).build()`in my code to create a Jackson YAML mapper with Kotlin extensions. This tells me "Kotlin: 'constructor KotlinModule(Int = ..., Boolean = ..., Boolean = ..., Boolean = ..., SingletonSupport = ..., Boolean = ...)' is deprecated. Use KotlinModule.Builder instead of named constructor parameters". Does that really mean I should use `val jackson: YAMLMapper = YAMLMapper.builder().addModule(KotlinModule.Builder().build()).build()`instead? That's an awful amount of build...
n
e
m
  • 3
  • 7
  • 1128
Hello! I am trying to load a layer-list drawable with this code: ```Image( painter = painterReso...
v

Vaios Tsitsonis

about 3 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
  • 1128
Has anyone tried measuring the size increase on a Compose multiplatform app? I built a one-screen sa...
j

Jacob Ras

over 1 year ago
Has anyone tried measuring the size increase on a Compose multiplatform app? I built a one-screen sample app that loads a list of cat pictures and shows them in a list. Clicking one enlarges it. I built it native (SwiftUI on iOS), KMP (Compose) and in Flutter to compare the three. On Android I'm seeing expected results (available in repo below). On iOS however, the size increase seems excessive. A thinned release build: native 1.7 MB, Compose: 24.8 MB, Flutter 48.1 MB. Debug build for simulator shows a similar ratio (4.6 / 57.6 / 91.8 MB). I don't think the Compose build is supposed to be that big, since I'm just using a couple of components. Please correct me if I'm wrong! 🙏 I have one guess: that the library isn't being stripped. I tried opening up the iOS archive without any luck (only binary files, didn't understand much of it 😬) All code + Android comparison results: https://github.com/jacobras/flutter-vs-native-vs-kmp Feel free to play around with it.
😮 2
👍 6
j
p
+4
  • 6
  • 13
  • 1127
I keep having `Module with the Main dispatcher is missing. Add dependency providing the Main dispatc...
r

Raphael TEYSSANDIER

almost 2 years ago
I keep having
Module with the Main dispatcher is missing. Add dependency providing the Main dispatcher, e.g. 'kotlinx-coroutines-android' and ensure it has the same version as 'kotlinx-coroutines-core'
on a
jvm
target
r
e
  • 2
  • 9
  • 1117
I don't really understand how to read / write files in okio 3 multiplatform (specifically on ios). A...
m

Michal Klimczak

over 3 years ago
I don't really understand how to read / write files in okio 3 multiplatform (specifically on ios). All examples show how to do it using
FileSystem.SYSTEM
which is only available on `jvm` . It's like everything is there when you have
FileHandle
or
Sink
, but the first step is vague. Any hints?
m
m
s
  • 3
  • 18
  • 1116
I wish the trailing-comma rule defaulted to adding a redundant trailing comma. It makes it easier to...
e

Emil Kantis

almost 3 years ago
I wish the trailing-comma rule defaulted to adding a redundant trailing comma. It makes it easier to add items later on, and such changes only shows a diff on the actual changed line. Basically just benefits of having the comma there. 🙂
e
s
p
  • 3
  • 9
  • 1114
If I have a suspend function that I want to call on a button click event what's the best way to do t...
a

andrewreitz

over 4 years ago
If I have a suspend function that I want to call on a button click event what's the best way to do that? Example
Button(
   onClick = { runit() }
) {
  Text("Run")
}
Where runit is the suspend function. I can put it in a runBlocking, but that locks up the whole UI and seems incorrect in this situation.
a
j
  • 2
  • 4
  • 1114
getting ```xcrun: error: unable to find utility "xcodebuild", not a developer tool or in PATH``` whi...
s

Sourabh Rawat

over 5 years ago
getting
xcrun: error: unable to find utility "xcodebuild", not a developer tool or in PATH
while running
gradle clean check.
What am I missing? I want to run tests in
ktor-client-tests
.
s
s
  • 2
  • 2
  • 1112
Previous272829Next

kotlinlang

A modern programming language that makes developers happier.

Powered by