https://kotlinlang.org
Join Slack
Are there any Kotlin Multiplatform libraries for playing sound on various platforms? Specifically, s...
d

darkmoon_uk

over 2 years ago
Are there any Kotlin Multiplatform libraries for playing sound on various platforms? Specifically, short sound-effects to accompany Compose Multiplatform UI?
d
b
  • 2
  • 4
  • 903
Is it possible to zip 3 lists? I am zipping 2 here, but I would like to throw a list of icons into t...
n

Nat Strangerweather

over 3 years ago
Is it possible to zip 3 lists? I am zipping 2 here, but I would like to throw a list of icons into the mix. How would it work in Kotlin?
@Composable
fun ShowDropDown(
    openDropDown: MutableState<Boolean>,
    text: List<String>,
    destination: List<DirectionDestination>,
    navigator: DestinationsNavigator,
) {
    DropdownMenu(
        expanded = openDropDown.value,
        onDismissRequest = { openDropDown.value = false },
    ) {
        text.zip(destination)
            .forEach {
                DropdownMenuItem(onClick = { navigator.navigate(it.second) },
                text = { Text(it.first) })
            }

    }
}
n
l
m
  • 3
  • 5
  • 903
Testing K2 and build output seems strange. It says: `##### 100% (220/220) tasks have been compiled w...
t

Tolriq

over 2 years ago
Testing K2 and build output seems strange. It says:
##### 100% (220/220) tasks have been compiled with Kotlin 2.0 #####
But as expected all the kapt tasks says:
w: Kapt currently doesn't support language version 2.0+. Falling back to 1.9.
Is this normal or am I missing some parameters?
t
j
t
  • 3
  • 6
  • 902
Hi, how can I modify the color of a Button when clicked ?
a

Ayfri

over 4 years ago
Hi, how can I modify the color of a Button when clicked ?
a
m
+3
  • 5
  • 20
  • 902
Is setting the value on a MutableStateFlow thread safe?
k

kevin.cianfarini

over 4 years ago
Is setting the value on a MutableStateFlow thread safe?
yes black 3
k
a
  • 2
  • 4
  • 902
I want to add a separator/Divider in a column after each item except last item, I don’t want to add ...
k

Karthick

over 1 year ago
I want to add a separator/Divider in a column after each item except last item, I don’t want to add more logics to check which one will be a last item. Any suggestions here?? For example i have 10 items inside my column but each can be added based a boolean condition, so anything can be the last item.
k
n
s
  • 3
  • 6
  • 901
I have a `LazyColumn` with an `AndroidView` which wraps a `WebView` ```LazyColumn { AndroidView...
z

zsperske

almost 3 years ago
I have a
LazyColumn
with an
AndroidView
which wraps a
WebView
LazyColumn {
    AndroidView(
      factory = {
           WebView()
      }
    )

   //other stuff
}
The WebView has horizontal scrolling but while scrolling it, the lazy column & android view “fight” over the scroll input. If your horizontal scroll has any kind of vertical component to it, the lazy column will start scrolling. Other native views in the same lazy column that scroll horizontally work correctly (as in if your scroll is partially vertical, the lazy column won’t scroll errantly) Has anyone run into this before?
z
c
  • 2
  • 5
  • 901
I'm having issues with `yarn.lock` checks. I've just updated an npm dependency, run `gradle kotlinU...
e

Edoardo Luppi

almost 2 years ago
I'm having issues with
yarn.lock
checks. I've just updated an npm dependency, run
gradle kotlinUpgradeYarnLock
, and committed + pushed the
yarn.lock
changes. Locally builds fine, on Jenkins it returns:
00:02:51.294  FAILURE: Build failed with an exception.
00:02:51.294  
00:02:51.294  * What went wrong:
00:02:51.294  Execution failed for task ':kotlinStoreYarnLock'.
00:02:51.294  > yarn.lock was changed. Run the `kotlinUpgradeYarnLock` task to actualize yarn.lock file
Am I supposed to run
kotlinUpgradeYarnLock
on the Jenkins pipeline too, or should it work straight away? I don't recall this issue in the past.
e
h
a
  • 3
  • 6
  • 900
I'm trying to upgrade Kotlin to 1.7.0 and I'm no longer able to get my `buildSrc` project to configu...
m

mkrussel

over 3 years ago
I'm trying to upgrade Kotlin to 1.7.0 and I'm no longer able to get my
buildSrc
project to configure. It's breaking on applying the
kotlin-dsl
plugin.
An exception occurred applying plugin request [id: 'org.gradle.kotlin.kotlin-dsl', version: '2.3.3']
> Failed to apply plugin class 'org.jetbrains.kotlin.gradle.plugin.KotlinPluginWrapper'.
   > Could not create an instance of type org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension.
      > Companion
Gradle version: 7.3.3 Kotlin version: 1.7.0 kotlin-dsl version: 2.2 and 2.3.3
m
m
+2
  • 4
  • 69
  • 900
Hi… What is the support for databases in kotlin native? E.g. is it possible to use for example Postg...
j

jcechace

over 3 years ago
Hi… What is the support for databases in kotlin native? E.g. is it possible to use for example Postgres? So far it looks like either there really isn’t any db support (except for maybe sqlite and some mobile databases such as Ream / Firebase) or my Google-fu is weak today.
j
e
+4
  • 6
  • 32
  • 900
Previous555657Next

kotlinlang

A modern programming language that makes developers happier.

Powered by