https://kotlinlang.org
Join Slack
Has anyone found a good solution for WebView on Compose/Desktop? Compose WebView multiplatform right...
m

Mike Dawson

almost 2 years ago
Has anyone found a good solution for WebView on Compose/Desktop? Compose WebView multiplatform right now uses KCEF (which bundles an entire copy of Chromium). Even that doesn't initialize on ubuntu for me (same issue as noted on WebViewKO below) WebViewKO - doesn't seem to want to cooperate on Ubuntu: https://github.com/Winterreisender/webviewko/issues/17 WebViewJava - I can get it to run, but demo of connecting with AWT/Swing crashes. Doesn't seem to be currently maintained. My current workaround: running web content in an internal web server, and running chrome with the --app command (removes the address bar etc). This seems like a major gap in the Compose/Desktop platform: most real world apps use webviews somewhere (authentication, external content presentation, etc)
m
b
h
  • 3
  • 19
  • 383
Hi, what is this error about? `Suspicious equality check: equals() is not implemented in Object` ``...
u

ursus

over 6 years ago
Hi, what is this error about?
Suspicious equality check: equals() is not implemented in Object
override fun areContentsTheSame(oldItemPosition: Int, newItemPosition: Int) =
        oldList[oldItemPosition] == newList[newItemPosition] <----------
Type of the list items is ChatItem, which is a sealed class
sealed class ChatItem

object ProgressBarItem : ChatItem()

data class ThreadHeaderItem(
    val commenterUsername: String,
    val commenterRealName: String?,
    val commenterImageUrl: String?,
    val commentedUsername: String,
    val commentedRealName: String?,
    val commentedTimestamp: LocalDateTime
) : ChatItem(), ThreadPart

data class AddCommentItem(val message: Message) : ChatItem(), ThreadPart
data class DateItem(val date: LocalDateTime) : ChatItem()
u
f
i
  • 3
  • 5
  • 383
Hey everyone I just released my first library for KMP - LogKat. The LogKat is a Kotlin Multiplatfor...
p

Prashant

about 1 year ago
Hey everyone I just released my first library for KMP - LogKat. The LogKat is a Kotlin Multiplatform (KMP) library that provides a unified solution for logging across Android and iOS platforms. This library simplifies cross-platform logging by eliminating the need for separate platform-specific code. With a single API, you can log messages that will appear in Android's Logcat or iOS's console, depending on the platform your app is running on. Key Features • Cross-Platform Logging: Supports logging on both Android and iOS with no extra setup. • Unified API: One simple API for logging across both platforms. • Color-Coded Output: Logs are color-coded based on severity (Info, Debug, Warning, Verbose, Error) for easy identification. • Platform-Specific Output: • On Android, logs are sent to Logcat. • On iOS, logs appear in the console (stdout), ideal for debugging. https://github.com/prashant17d97/LogKat I would love and really appreciate your feedback.
p
m
+6
  • 8
  • 22
  • 382
Hello! Does Compose UI compile to macOS? I'd like to integrate it into `AppKit` and into a `ScreenSa...
l

louiscad

almost 2 years ago
Hello! Does Compose UI compile to macOS? I'd like to integrate it into
AppKit
and into a
ScreenSaverView
I think I'd need this in
gradle.properties
, but is there anything else I'd need? > org.jetbrains.compose.experimental.macos.enabled=true
l
j
+3
  • 5
  • 17
  • 382
I'm trying to publish my version catalogs to maven but my `libs.toml` file isn't getting uploaded. I...
r

Rafs

over 2 years ago
I'm trying to publish my version catalogs to maven but my
libs.toml
file isn't getting uploaded. Is there anything i'm missing. Here is my publish script.
publishing {
    publications {
        create<MavenPublication>("maven") {
            artifactId = rootProject.name
            from(components.getByName("versionCatalog"))

            pom {
                name.set("versions")
                description.set(project.description)
                url.set("https:/example.com")
            }
        }
    }
}
r
j
+2
  • 4
  • 20
  • 382
Is it okay to store data in the CoroutineContext so that we don’t have to pass it from suspend funct...
l

Lukas Lechner

almost 3 years ago
Is it okay to store data in the CoroutineContext so that we don’t have to pass it from suspend function to suspend function? The use case is that we have a backend application, and we currently store authentication information at the beginning of each request so that we are able to receive them from every suspend function without needing to pass them as paremeters all the time…
l
o
+2
  • 4
  • 7
  • 382
Hey! I am working with Redisson locks and Kotlin coroutines. The issue is that the locks are based a...
g

GUIGAL Allan

about 4 years ago
Hey! I am working with Redisson locks and Kotlin coroutines. The issue is that the locks are based and acquired by a thread (with its thread id), however considering different coroutines can actually be scheduled on the same thread the lock mechanism won’t work across different coroutines (cause they have the same thread id). Do you have any idea on how I could fix this ? Is there a way to have a coroutine id for example ? Thanks
g
e
d
  • 3
  • 6
  • 382
Has anybody had success using custom fonts with @Preview composables? Android Studio is failing to ...
d

Dave Scheck

about 1 year ago
Has anybody had success using custom fonts with @Preview composables? Android Studio is failing to render with
java.lang.IllegalStateException: Could not load font
  at androidx.compose.ui.text.font.TypefaceRequestCache.runCached(FontFamilyResolver.kt:207)
  at androidx.compose.ui.text.font.FontFamilyResolverImpl.resolve(FontFamilyResolver.kt:92)
The fonts are ttf files in
/app/src/main/res/font
and are being used like
Text("Test", fontFamily = robotoFontFamily)
The app works fine on real devices, it just seems to be something related to loading fonts for the preview pane in Android Studio. I'm using Koala Feature Drop 2024.1.1 and compose BOM 2024.09.02.
d
d
  • 2
  • 8
  • 381
I have an issue where im trying to import in FlipperKit, ```cocoapods { ios.deploymentTarget...
a

Andrew Reed

over 2 years ago
I have an issue where im trying to import in FlipperKit,
cocoapods {
        ios.deploymentTarget = "10.0"
        noPodspec()
        framework { isStatic = true }
        pod("FlipperKit")
    }
Executing of 'pod install' failed with code 1 and message: 

Analyzing dependencies
Downloading dependencies
[!] The 'Pods-ios' target has transitive dependencies that include statically linked binaries: (Flipper-Boost-iOSX)
When i do pod install manually in the build folder, if i add use_modular_headers! it seems to download. How can i make my build gradle do this, - this is a KMM library not an app
a
a
  • 2
  • 32
  • 381
Do you folks use KMP code from native (iOS) background threads? I have an existing iOS project and ...
m

Martin Rajniak

over 3 years ago
Do you folks use KMP code from native (iOS) background threads? I have an existing iOS project and would like to replace single platform solution in it with KMP library. Currently iOS project is calling the solution from the background thread. Naively I thought I will just replace one callback method with another (generated from
suspend
function). But this is not possible if I understand correctly:
Calling Kotlin suspend functions from Swift/Objective-C is currently supported only on main thread
I am using Kotlin 1.6.10, Coroutines 1.6.0 (without
native-mt
) and new experimental memory model. Is the current practice to leave threading to multi-platform code or am I missing something?
m
r
+3
  • 5
  • 8
  • 381
Previous178179180Next

kotlinlang

A modern programming language that makes developers happier.

Powered by