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
  • c

    Colton Idle

    03/29/2021, 10:48 AM
    Noob question about multi modules and compose android and desktop. I've worked with compose on android and desktop very little and I've never worked with a multi module android app. In this case though... I have a fairly simple existing app that I already added compose to, but my plans are to add a new module to my android app that houses compose called
    composables-common
    I already created this module in Android Studio as a new android library module. Now I want to create a new module in the same project that is a compose desktop module and have it depend on
    composables-common
    Two questions: 1. Is making my composables-common module supposed to be a
    com.android.library
    module? 2. Does anyone see any issue with my "proposed" setup? Existing android app module. Create new composables-common android library module. Set this composables-common as a dependency in my existing app module. Create new compose desktop app plain ol java module. Depend on composables-common dependency in the desktop module. Working on Android? Open the project in AS and choose android app module to launch. Working on desktop? Open the project in IJ and choose desktop app module to launch. I have seen the sample projects showing desktop and android app in a single repo, but I guess I'm more stuck on how to do it for an already existing project. Thank you!
    i
    • 2
    • 20
  • p

    PHondogo

    03/29/2021, 1:46 PM
    Hello! In ui-desktop dependency there is composable AppWindow. It exists only for jvm target. Is there any plans to make it common? (For native linux, windows, mac os)
    j
    n
    • 3
    • 4
  • y

    Yan Pujante

    03/29/2021, 4:54 PM
    I have the following piece of logic:
    @Composable
    fun EditPartUI(part: Part, onDismiss: () -> Unit) { /* */ }
    
    @Composable
    fun PartXX() { 
        var pendingPartCreate by remember { mutableStateOf<Part?>(null) }
        
        if(pendingPartCreate == null) {
            ScrollableTab(
                onFabAction = { pendingPartCreate = Part() }) {
                // ....
            }
        } else {
            EditPartUI(pendingPartCreate!!, onDismiss = { pendingPartCreate = null} )
        }
    }
    The
    else
    branch does not compile unless I use
    pendingPartCreate!!
    (smart cast does not work). So is the compiler not smart enough to detect the fact that it cannot change? Or is the compiler rightfully wants to prevent me from shooting myself in the foot?
    t
    j
    a
    • 4
    • 6
  • t

    TheMrCodes

    03/29/2021, 8:09 PM
    Is there any Documentation for testing compose on Desktop and what dependencies I need to implement into my grade project?
    ➕ 2
    i
    t
    o
    • 4
    • 6
  • r

    romainbsl

    03/30/2021, 1:36 PM
    Hi, Is there any version Compose version built with
    1.5.0-M2
    ? If not, do you plan to or should we be waiting for
    1.5.0
    ?
    s
    • 2
    • 1
  • t

    theapache64

    03/30/2021, 2:29 PM
    Is there any known animation issue with
    0.4.0-build178
    ?
    animateFloatAsState
    doesn't seem to work anymore. 🤔 🧵
    j
    d
    • 3
    • 9
  • s

    spierce7

    03/30/2021, 5:13 PM
    Is there any example of writing UI tests with compose desktop?
    j
    i
    c
    • 4
    • 6
  • t

    theapache64

    03/30/2021, 5:25 PM
    I am wondering why's everyone going after testing this week 😆
    ➕ 2
    c
    t
    i
    • 4
    • 8
  • m

    Michael Pardo

    03/31/2021, 1:19 PM
    Hi, someone has tried to build the Msi package? I am trying but the command gives me an error on Windows
    👍🏼 1
    t
    m
    o
    • 4
    • 6
  • m

    Michael Pardo

    03/31/2021, 4:04 PM
    Hi, someone knows how can create a desktop launch (installed)? for every platfform
    c
    t
    • 3
    • 8
  • m

    Michael Pardo

    04/01/2021, 4:23 AM
    Hi, someone knows why (In windows) the app don't appear in the searchbox?
    t
    • 2
    • 3
  • t

    TheMrCodes

    04/01/2021, 9:31 AM
    Can I change the background color of the window? 🧵
    i
    • 2
    • 7
  • s

    Steve

    04/01/2021, 12:10 PM
    What are the most common ways to provide multi language support?
    i
    • 2
    • 1
  • c

    Chris Sinco [G]

    04/01/2021, 4:58 PM
    This has probably been asked before, but is there a way to know what Compose version from Google is being used in Compose Desktop builds? Like is
    beta01
    in
    0.3.0
    ?
    💯 2
    👍 5
    j
    • 2
    • 1
  • o

    orangy

    04/01/2021, 10:34 PM
    I would appreciate OS-independent APIs to get system colors, like for controls, backgrounds, text, etc. And it should properly respond to system theme change, like dark/light or even custom. Is there something like this on the roadmap?
    a
    a
    • 3
    • 4
  • c

    Colton Idle

    04/02/2021, 4:11 AM
    If I try to have a single module common-composables that are shared for desktop and android... am I "held back" by the version number that desktop supports? I know desktop is slightly behind and just curious if that basically means I'm always going to be a ~week+ behind on compose releases.
    j
    t
    • 3
    • 5
  • k

    Kirill Grouchnikov

    04/02/2021, 5:05 AM
    https://github.com/JetBrains/compose-jb/releases lists all the releases now
    💪 3
    💪🏼 1
    j
    t
    a
    • 4
    • 13
  • v

    v79

    04/02/2021, 7:56 AM
    Is compose-desktop feasible for desktop-only apps? Or am always going to be constrained by its mobile-centric roots? I'm needing tooltips, file pickers, font pickers, that sort of thing...
    t
    j
    • 3
    • 6
  • t

    theapache64

    04/02/2021, 10:00 AM
    This version (1.0.0-alpha13) of the Compose Compiler requires Kotlin version 1.4.31 but you appear to be using Kotlin version 1.4.32
    so we need to downgrade the kotlin version ? 🙄
    :yes: 1
    j
    a
    b
    • 4
    • 4
  • v

    v79

    04/02/2021, 11:35 AM
    What components should I be using to create something like a font selector dialog? E.g. I have a Box with a LazyColumn and a VerticalScrollBar. Inside the LazyColumn is a Text item - but how do I make the Text item 'selectable'? Should this be a button instead? Or?
    j
    • 2
    • 3
  • v

    Virus00x

    04/02/2021, 3:59 PM
    I am a new learner, learning Jetpack Compose. I came across Compose-Desktop during the process. So I tried searching web about the difference between Qt/TornadoFX/Compose-Desktop. Can Compose-Desktop be used where we use Qt? Moreover TornadoFX is itself in Kotlin, so which one is better to focus on for a novice in UI programming?
    j
    u
    • 3
    • 2
  • t

    Timo Drick

    04/02/2021, 6:11 PM
    I did a proof of concept for a LiveCanvas component where you can change code inside of the Canvas during runtime and it will compile the changes as Kotlinscript instantly. https://gitlab.com/compose1/livecanvas-poc
    live_canvas_demo.mp4
    :kotlin-intensifies: 21
    ❤️ 1
    🎉 11
    :kotlin: 6
    t
    g
    • 3
    • 4
  • y

    Yofou

    04/02/2021, 11:43 PM
    So I'm almost 100% certain this ain't the correct place to ask. but I'm not really sure where else to ask, so here it goes. I'm using Jetpack compose for desktop and I'm using
    decompose
    for my navigation and to decouple my logic from my UI, however I'm little bit stumpped on this one problem, two pages I have need to share same state and I'm struggling to figure out how to pass it down to both of them, the closest I got was to put it in my NavComponent class and try to pass it down through the child
    render
    functions, I reckon if i tinckered abit more, I could maybe of got it too work, however this was getting really ugly and hard to maintain which makes me feel like I'm doing it wrong, so I reverted the changes back and I'm now asking for any examples or further advice on how to aproach something like this with
    decompose
    c
    j
    a
    • 4
    • 18
  • c

    CLOVIS

    04/03/2021, 4:10 PM
    Is there a build compatible with 1.5-M2? `e: This version (1.0.0-alpha13) of the Compose Compiler requires Kotlin version 1.4.31 but you appear to be using Kotlin version 1.5.0-M2 which is not known to be compatible. Please fix your configuration (or
    suppressKotlinVersionCompatibilityCheck
    but don't say I didn't warn you!).`
    🇳🇴 5
    😒ame: 1
    m
    o
    +2
    • 5
    • 6
  • a

    Aaron Yoder

    04/04/2021, 2:07 AM
    Building a desktop app, and using
    Modifier.combinedClickable().indication()
    on a
    Box
    , and having a hard time figuring out how to just set the indication to null. As I understand it, I should just be able to set
    indication = null
    , but when I do
    .indication(indication = null)
    it complains about no value passed for
    interactionSource
    . Not really sure what I should pass there. There was this workaround I found from a few weeks ago (
    interactionSource = remember { MutableInteractionSource() }, indication = null
    ) but that doesn't seem to have any effect, the indication is still there.
    c
    • 2
    • 4
  • d

    Deklan Webster

    04/04/2021, 2:21 PM
    Have an extension of the question @v79 asked the other day
    Is compose-desktop feasible for desktop-only apps? Or am always going to be constrained by its mobile-centric roots? I'm needing tooltips, file pickers, font pickers, that sort of thing...
    If someone is interested in building primarily a desktop app (maybe a mobile app port someday), how do Flutter and Compose-desktop compare for that purpose? (I know there are probably many Flutter vs Compose questions but, sorry, it's very confusing as an outside observer)
    👍 1
    j
    a
    +2
    • 5
    • 6
  • v

    v79

    04/05/2021, 4:17 PM
    Haha! This was a little unexpected from a `BasicTextField`function!
    j
    r
    • 3
    • 9
  • g

    gpaligot

    04/06/2021, 2:37 PM
    Hello here 👋 I’m working on an open source project (https://github.com/GerardPaligot/discovering-movies) where I want to try compose on Android and Desktop. I had never tried Compose Desktop before but I’m surprised to see that Compose Desktop have their own Compose librairies. There is no way to share components between platforms?
    i
    • 2
    • 2
  • o

    orangy

    04/06/2021, 6:21 PM
    I have no idea how it works on Android, so posting here, but it could be generic problem. In modern OSes when you push the button (but don’t release the mouse!), move cursors away from button it gets depressed, and if you release it, no click is registered. All fine here. But, if you don’t release mouse after moving away, and move cursor back into button area, it gets pressed back and if you release the mouse the click is registered. This is not working in Compose (desktop).
    ➕ 4
    j
    c
    +5
    • 8
    • 19
  • h

    Hyia

    04/07/2021, 12:22 AM
    do you met the problem that idea cannot auto import getValue of
    by mutableStateOf
    ➕ 1
    c
    • 2
    • 3
Powered by Linen
Title
h

Hyia

04/07/2021, 12:22 AM
do you met the problem that idea cannot auto import getValue of
by mutableStateOf
➕ 1
c

Colton Idle

04/07/2021, 12:23 AM
Known issue AFAIK. It's been mention a few times in here and #compose You should be able to add the import manually OR if you write out the mutableStateOf type explicitly (I think) then the importing will actually work. I've never hit this issue though so I could be saying the wrong thing. Search those two channels though and you'll find the right answer.
h

Hyia

04/07/2021, 12:25 AM
okay, thank you. I'll check it later
c

Colton Idle

04/07/2021, 12:25 AM
It comes up every few days, so it should be somehwat recent. I think I saw it in the past week. 😄
View count: 4