https://kotlinlang.org
Join Slack
I want to loop over the elements of a queue, and remove them in the process. is there a fancy way to...
l

LastExceed

about 5 years ago
I want to loop over the elements of a queue, and remove them in the process. is there a fancy way to achieve this with
for (x in y)
or do i have to remove them manually ?
l
d
+5
  • 7
  • 19
  • 686
Hello, is Ktor client supported on WasmJS? I'm getting errors on Gradle sync: ```:shared:wasmJsMain:...
i

Iliyan Germanov

about 1 year ago
Hello, is Ktor client supported on WasmJS? I'm getting errors on Gradle sync:
:shared:wasmJsMain: Could not resolve io.ktor:ktor-client-content-negotiation:2.3.10
If not are there any known workarounds? I want our
commonMain
Compose app to be able to run in the browser. I have the following abstraction that seems to work on the other platforms:
class JVMPlatform: Platform {
    override val name: String = "Java ${System.getProperty("java.version")}"

    override fun log(level: LogLevel, msg: String) {
        println("${level.name}: $msg")
    }

    override fun httpClient(
        config: HttpClientConfig<*>.() -> Unit
    ): HttpClient = HttpClient(Java) {
        config(this)
    }
}
✅ 2
i
j
n
  • 3
  • 6
  • 684
<< UPDATE: THIS HAS BEEN RESOLVED >> << FIX: I just had to use a unit with the `kotlin.daemon.jvmarg...
s

Shubham Singh

6 months ago
<< UPDATE: THIS HAS BEEN RESOLVED >> << FIX: I just had to use a unit with the
kotlin.daemon.jvmargs
property inside my
gradle.properties
file (e.g. replace
-Xmx2048
with
-Xmx2048m
) >> I'm not sure why, but I've started seeing these errors whenever I run my Kobweb app (using
kobweb run
), make changes to any file, and save (using
Cmd + S
). Has anyone else observed these?
(Errors inside the thread) Because of these, the re-build time (on each save) has also gotten slower.
s
d
  • 2
  • 26
  • 683
Folks is there anyone encounter following log: `Method boolean androidx.compose.runtime.snapshots....
m

miqbaldc

over 2 years ago
Folks is there anyone encounter following log:
Method boolean androidx.compose.runtime.snapshots.SnapshotStateList.conditionalUpdate(kotlin.jvm.functions.Function1) failed lock verification and will run slower.
    Common causes for lock verification issues are non-optimized dex code
    and incorrect proguard optimizations.
m
  • 1
  • 2
  • 683
Is there a way to make a word bold or italics within a Text in Jetpack Compose, without having to cr...
d

Daniele B

over 4 years ago
Is there a way to make a word bold or italics within a Text in Jetpack Compose, without having to create different Texts for applying the bold or italics fontStyle?
d
n
+2
  • 4
  • 4
  • 683
Using the Tray composable to displaying notifications as described in this <tutorial> does not work ...
j

Jonathan

almost 2 years ago
Using the Tray composable to displaying notifications as described in this tutorial does not work for me on a Macbook running macOS Sonoma. I’ve checked in Notification setting of System Settings and verified that notifications were enabled for Intellij IDEA. The app doesn’t crash nor are any errors printed in the console. Does anyone have the slightest idea of what could be causing this issue?
j
s
+4
  • 6
  • 15
  • 682
TLDR: does android/compose/material have "auto" line height? When overriding a font style to set a ...
k

Kevin Worth

about 2 years ago
TLDR: does android/compose/material have "auto" line height? When overriding a font style to set a font size, what happens if we don't set line height? Is it automatically adjusted? Or does it keep the default value? Does the answer differ for either of the following: • Using
.copy
// don't make any change in Type.kt
...
Text(
    text = ...
    style = MaterialTheme.typography.displayLarge.copy(fontSize = 50.sp)
)

// Will this have a line height of 64, or will line height be "auto"?
• Override in
Type.kt
displayMedium = TextStyle(
        fontFamily = FontFamily.Default,
        fontWeight = FontWeight.SemiBold
        fontSize = 40.sp,
//      don't set lineHeight
//      don't set letterSpacing
    ),

...
Text(
    text = ...,
    MaterialTheme.typography.displayMedium
)

// Will this have a line height of 52, or something like Unspecified, which then means "auto"? Or...?
Our designers are taking advantage of Figma's ability to set line height to "auto"(which ends up being odd values like 51.74) and they ask, "Wait, you mean Android doesn't have auto line height?" So, does it?
k
f
+4
  • 6
  • 23
  • 682
How can I secure store strings like passwords in a ktor app?
ł

Łukasz Bednarczyk

almost 4 years ago
How can I secure store strings like passwords in a ktor app?
ł
a
+3
  • 5
  • 8
  • 680
I run Detekt in a multimodule project and while the `detekt {` configuration is applied to all sub p...
e

Emanuel Moecklin

over 1 year ago
I run Detekt in a multimodule project and while the
detekt {
configuration is applied to all sub projects (in the main build.gradle file)
subprojects {
    apply plugin: "io.gitlab.arturbosch.detekt"
    detekt {
        debug = false
        parallel = true
        config.setFrom("${rootProject.projectDir}/default-detekt-config.yml")
        baseline = file("${rootProject.projectDir}/detekt-baseline.xml")
        buildUponDefaultConfig = true
        allRules = false
    }
}
the
task.detekt
configuration is ignored by sub projects:
tasks.detekt.configure {
    exclude("**/test/**")
    reports {
        html.required.set(true)
How can I configure the Detekt task to be applied to all Gradle modules? The documentation has examples showing the task configuration included in the detekt closure/lambda but that seems to be deprecated (e.g. I get
HTML report location set on detekt {} extension will be ignored for detekt task.
)
e
b
  • 2
  • 3
  • 679
Why are `androidx.compose.ui.util.fastAny` and `androidx.compose.ui.util.fastForEach` not available?
s

Stefan Oltmann

over 3 years ago
Why are
androidx.compose.ui.util.fastAny
and
androidx.compose.ui.util.fastForEach
not available?
✅ 1
s
r
m
  • 3
  • 4
  • 679
Previous747576Next

kotlinlang

A modern programming language that makes developers happier.

Powered by