https://kotlinlang.org logo
Docs
Join the conversationJoin Slack
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by Linen
compose-desktop
  • s

    SrSouza

    10/31/2021, 10:05 PM
    There is any API to listen to keyboard events in background in Compose Desktop? example: for opening the window with a shortcut?
    k
    r
    +1
    5 replies · 4 participants
  • t

    Tobias Suchalla

    11/01/2021, 7:47 AM
    Is there a way to listen to focus changes of the window? I tried
    val windowInfo = LocalWindowInfo.current
    LaunchedEffect(windowInfo) {
        snapshotFlow { windowInfo.isWindowFocused }
            .onEach { println(it) }
            .launchIn(this)
    }
    but it only prints
    false
    once and that's that.
    i
    2 replies · 2 participants
  • d

    dimsuz

    11/01/2021, 3:07 PM
    I have the following code and for some reason
    LazyColumn
    is not scrollable, it gets cut off. I will post a screenshot in the thread. Notice that I've added button and it is positioned correctly, so Box constraints are correct. I've added
    PaddingValues
    and now it's obvious that
    LazyColumn
    is not meausred with window's height. This is
    1.0.0-beta5
    . Do I do something wrong? Similar code works in Android afaik.
    Window(onCloseRequest = { exitApplication() }) {
      MaterialTheme {
        Box(modifier = Modifier.fillMaxSize()) {
          LazyColumn(modifier = Modifier.fillMaxSize(), contentPadding = PaddingValues(30.dp)) {
            items(80) { index -> Text("Hello $index") }
          }
          Button(onClick = {}, modifier = Modifier.align(Alignment.BottomStart)) { Text("Hello") }
        }
      }
    }
    k
    5 replies · 2 participants
  • n

    Nikola Drljaca

    11/02/2021, 10:43 AM
    Hello all! I have a desktop compose project with a kotlin and java source set in the main module. I think I may have an issue with the java source set, or with packaging it in some way. When I run the app from MainKt everything works fine. But, once I build it and create a distributable image, the app runs until I press a button that calls a static method from the java source set and the app just freezes. No errors, no exceptions. Anyone know what could be the problem? The java class in question has a static method that has imports from
    javax.smartcardio
    , which could be causing some issues since its supposed to interact with usb ports and whatnot.
    o
    1 reply · 2 participants
  • c

    Clament John

    11/02/2021, 11:11 AM
    [✅ solved] Where is the sqlite database saved when using
    SQLDelight
    for JVM in Compose desktop? I can't find the database in the project folder
    k
    1 reply · 2 participants
  • c

    Clament John

    11/03/2021, 7:43 AM
    Is there an
    Decompose
    example app (multi platform) that implements 1. Platform specific actions like importing an image file (file explorer in desktop and content provider in android) What I'm having difficulty is how should I let the platform know a platform specific action has to happen? The
    todo app
    example, even though display's decompose's navigation prowess it can be quickly glazed up on with very little multi platform specif code. Edited This looks like something for MVI? Well following decompose for multi platform makes your app MVI by default I guess.
    g
    2 replies · 2 participants
  • a

    Alexandru Hadăr

    11/03/2021, 4:55 PM
    Hey guys, Is there any API to listen for window resizing ? To know whenever the Width/Height of a window modifies?
    i
    2 replies · 2 participants
  • s

    Scott Kruse

    11/04/2021, 12:33 AM
    Is the compose runtime artifact compatible with iOS targets?
    j
    h
    7 replies · 3 participants
  • s

    SrSouza

    11/04/2021, 12:33 AM
    There is anyway to compile locally Skiko from a branch and use it at Compose JB project (without building the Compose JB locally)?
    i
    4 replies · 2 participants
  • h

    Huixing.Wang

    11/04/2021, 2:46 AM
    Hello, when i use kmp expect fun and put a modifier as default param, but it run with a NPE,Anyone know why?
    m
    l
    +2
    9 replies · 5 participants
  • k

    Kebbin

    11/04/2021, 12:03 PM
    Hello! Can I use WindowState to set initial size of application window, or should I be using a different code now? Thanks.
    👀 1
    d
    21 replies · 2 participants
  • m

    Moritz Lindner

    11/05/2021, 8:03 AM
    Hello 🙂 Did anyone use a bytecode shrinker to improve the sizes of native distributions? If yes is it worth the size gain and could you share your setup?
    m
    1 reply · 2 participants
  • k

    Kirill Grouchnikov

    11/05/2021, 8:39 PM
    ummm, I didn't mean this code to be this rude
    😂 7
    👏🏼 2
    👏 2
    😆 2
    e
    m
    +2
    10 replies · 5 participants
  • b

    Big Chungus

    11/06/2021, 10:00 AM
    Did you try setting jvm target to 1.8 in gradle (for both, kotlin and java plugins)
    r
    9 replies · 2 participants
  • k

    Kebbin

    11/06/2021, 11:20 AM
    I think this paragraph was my real BING moment! "In Compose's declarative approach, widgets are relatively stateless and do not expose setter or getter functions. In fact, widgets are not exposed as objects. You update the UI by calling the same composable function with different arguments. This makes it easy to provide state to architectural patterns such as a 
    ViewModel
    , as described in the Guide to app architecture. Then, your composables are responsible for transforming the current application state into a UI every time the observable data updates." And again here further down: "Recomposition: In an imperative UI model, to change a widget, you call a setter on the widget to change its internal state. In Compose, you call the composable function again with new data. Doing so causes the function to be recomposed--the widgets emitted by the function are redrawn, if necessary, with new data. The Compose framework can intelligently recompose only the components that changed." I'm only an amateur, but I'm loving this a lot! 🤓
    🦘 2
    💡 2
    👏 3
    🥳 3
    :kotlin-intensifies: 2
    🚂 2
    d
    24 replies · 2 participants
  • m

    mcpiroman

    11/06/2021, 5:42 PM
    If I use the latest compose-jb version, say v1.0.0-beta6-dev446 , and use it for Android, is it actually newer than the google's mainstream v1.0.1?
    r
    1 reply · 2 participants
  • i

    iamthevoid

    11/07/2021, 7:38 AM
    I want to build windows program on Linux machine. I added
    TargetFormat.Exe
    and tried to run
    packageExe
    task. Project new and just created. I got output [thread]. When i inspect build folder there is no
    .exe
    files. What means
    SKIPPED
    ? Nothing builds? May i somehow build exe on linux? Why i got no errors?
    m
    c
    +1
    5 replies · 4 participants
  • k

    Kebbin

    11/07/2021, 7:38 AM
    Hello! I'm looking for functionality like this: https://developer.android.com/jetpack/compose/gestures#multitouch But in Desktop Compose, to handle Zoom, Pan, Rotate, etc, using a mouse input. Any suggestions? Thanks!
    👀 1
    5 replies · 1 participant
  • h

    hfhbd

    11/07/2021, 6:24 PM
    How can you run Composable non ui tests?
    implementation(compose.uiTestJUnit4)
    needs skiko, but I only want to test @Composable without ui.
    a
    2 replies · 2 participants
  • k

    Kebbin

    11/08/2021, 10:25 AM
    Hello! I can't seem to find a way to detect the mouse wheel rolling, to create a zoom function. Thanks!
    i
    m
    18 replies · 3 participants
  • m

    mikehearn

    11/08/2021, 2:05 PM
    Does anyone have a view on what the coolest looking Compose Desktop app is, at present? I'm playing with the examples but some of them are kinda broken/buggy/not that cool looking.
    o
    s
    +2
    12 replies · 5 participants
  • m

    mikehearn

    11/08/2021, 2:05 PM
    e.g. the widget gallery appears to lack scrollbars.
    🧵 1
    o
    1 reply · 2 participants
  • m

    mikehearn

    11/08/2021, 2:24 PM
    I sort of vaguely recall someone made a music player /spotify type app?
    a
    2 replies · 2 participants
  • c

    carlosjordi

    11/08/2021, 10:03 PM
    Hi, maybe kind of a noob question, but in android we use viewmodel to hold data/states, here in compose for desktop what is the recommended thing to use ? if already asked or not related here, I'd like to atleast get the old answer or docs so I can get read it. Thanks in advance!
    c
    1 reply · 2 participants
  • k

    kevindmoore

    11/08/2021, 11:39 PM
    Just out of curiosity: Is compose using Swing because it already works? I've been a Swing developer before but would like to get away from it
    o
    1 reply · 2 participants
  • a

    Aaron Yoder

    11/11/2021, 1:15 AM
    I'm a little confused. I want to use a boolean value from my model to show/hide some things on my UI, but it doesn't work if I have a TextField in my set of composables. The state won't change for any of the composables in the block
    t
    z
    19 replies · 3 participants
  • s

    spierce7

    11/11/2021, 1:17 AM
    I was building DMGs compatible with intel macs on an arm mac build machine. All our builds after we upgraded to Compose Beta no longer work on intel macs when they are compiled with an arm mac (they work fine when compiled with intel mac). Was this an intentional change? Can we compile a DMG for intel macs on arm machines any more?
    1 reply · 1 participant
  • j

    Javier

    11/11/2021, 3:25 AM
    Anyone with this issue?
    "error": "Packages monthly outgoing traffic limit of 1.4 TB exceeded"
    https://maven.pkg.jetbrains.space/public/p/compose/dev/org/jetbrains/compose/ui/ui/1.0.0-beta6-dev450/ui-1.0.0-beta6-dev450.pom
    :kotlin-intensifies: 1
    😱 1
    o
    1 reply · 2 participants
  • o

    olonho

    11/11/2021, 5:36 AM
    we hit traffic limit on https://maven.pkg.jetbrains.space - now shall be functional again
    m
    1 reply · 2 participants
  • m

    mikehearn

    11/11/2021, 11:13 AM
    Yes there is. You have to install the IntelliJ plugin to get it. For me I couldn't make it work but the feature does exist. It'll probably become more robust in the coming months.
    👍 1
    e
    3 replies · 2 participants
Powered by Linen
Title
m

mikehearn

11/11/2021, 11:13 AM
Yes there is. You have to install the IntelliJ plugin to get it. For me I couldn't make it work but the feature does exist. It'll probably become more robust in the coming months.
👍 1
e

elect

11/11/2021, 11:18 AM
nice, do you remember the name?
ah found https://plugins.jetbrains.com/plugin/16541-compose-multiplatform-ide-support
I confirm it works on Ultimate non-EAP
View count: 4