https://kotlinlang.org logo
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
  • d

    Dmitry Romanov [JB]

    02/10/2021, 10:25 AM
    Hey folks! Many thanks to everyone who took part in our previous survey! Your feedback is very helpful for us! One more question for you guys, please answer: For what purposes do you plan to use Compose for Desktop UI Framework? 🍎 - To replace Swing/AWT/JavaFX 🍌 - To reuse experience, I’ve gained from Android platform, to build Desktop UIs with Kotlin 🍐 - To reuse experience, I’ve gained from other platforms (React, Flutter, etc), to build Desktop UIs with Kotlin 🍒 - To create multiplatform apps (or make my app multiplatform) 🍉 - As an interface to access Skia library 🌶️ - Other (please tell us about a bit in the :thread-please:)
    🍎 30
    🍒 59
    🌶️ 1
    🍐 8
    🍉 1
    🍌 35
    t
    t
    +3
    • 6
    • 5
  • a

    Ali Albaali

    02/10/2021, 10:41 AM
    Is there a testing dependency for Compose plugin? I can't find any.
    i
    • 2
    • 1
  • d

    Dirk Hoffmann

    02/10/2021, 4:54 PM
    but upgrading to build 150+ on my:
    val rememberedScaffoldState: ScaffoldState = rememberScaffoldState(drawerState)
    ...
    rememberedScaffoldState.drawerState.close()
    I get
    Suspend function 'close' should be called only from a coroutine or another suspend function
    how to workaround that??
    j
    • 2
    • 5
  • d

    Dirk Hoffmann

    02/10/2021, 4:56 PM
    as well as
    IconButton(onClick = scaffoldStateClick())
    gives me:
    The feature "unit conversion" is disabled
    am a bit clueless on how to fix both...
    j
    • 2
    • 4
  • s

    Shabinder Singh

    02/10/2021, 5:37 PM
    Error: Resource File Not Found Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: resource common/compose-ui/src/main/res/drawable/ic_spotiflyer_logo.xml not found Getting Resource Not Found tried paths: 1)Repository Path:"common/compose-ui/src/main/res/drawable/ic_spotiflyer_logo.xml" 2) module resources path:"drawable/ic_spotiflyer_logo.xml" But same error , how to verify which path should I use correctly?
    j
    • 2
    • 10
  • s

    Shabinder Singh

    02/10/2021, 6:26 PM
    Error:_Reading a state that was created after the snapshot was taken or in a snapshot that has not yet been applied._ Occurs when I lauch a coroutine in Dispatcher.IO to change value of mutableState. Some has suggest to use LaunchedEffect,but for me it doesnt seem to be working i.e the job doesnt execute(bcuz launched effect seems to dont run unless we change key). is there any other Workaround?
    a
    • 2
    • 6
  • a

    Arkadii Ivanov

    02/10/2021, 9:32 PM
    Am I right that versions
    build150
    and
    build152
    are broken due to https://github.com/JetBrains/compose-jb/issues/354 ? I can't compile for Android.
    k
    j
    • 3
    • 3
  • c

    Colton Idle

    02/11/2021, 2:13 AM
    Was a little inspired by that color app that was posted earlier today and I got to thinking that I maybe want to build a color picker app. Does compose desktop allow you to hook into accessibility on mac in order to grab colors from other apps? Or would I have to build a native mac app to access those apis?
    j
    r
    k
    • 4
    • 5
  • e

    eygraber

    02/11/2021, 5:58 AM
    Are there any plans to have a multiplatform image loading library for compose?
    a
    • 2
    • 1
  • a

    Ali Albaali

    02/11/2021, 10:06 AM
    I'd like to introduce you to Kamel. A multiplatform image loading library for Compose. Please check it out and let me know your feedback 🎉.
    :kotlin-intensifies: 15
    👍 7
    ❤️ 2
    t
    m
    e
    • 4
    • 7
  • t

    theapache64

    02/11/2021, 5:12 PM
    I am getting
    java.lang.OutOfMemoryError: Metaspace
    after spending sometime in the IDE. Here's the full stacktrace. Is this expected? Any workaround for this?
    s
    • 2
    • 2
  • s

    Shabinder Singh

    02/11/2021, 8:29 PM
    Jetpack Compose build150 Error: java.lang.NoSuchMethodError: 'androidx.compose.ui.Modifier androidx.compose.foundation.layout.SizeKt.preferredWidth-3ABfNKs(androidx.compose.ui.Modifier, float)'
    k
    • 2
    • 10
  • c

    Colton Idle

    02/12/2021, 12:24 AM
    Trying to put a "browser"/webview in my compose desktop app, but this doesn't seem to exist? I was looking and found that you can put a Swing component into your compose app and so I looked up and saw that you can build a webview with swing... and so now I'm using this tutorial but it doesn't compile https://github.com/JetBrains/compose-jb/tree/master/tutorials/Swing_Integration#adding-a-swing-component-to-cfd-composition-using-swingpanel It doesn't compile because it can't resolve
    import androidx.compose.desktop.SwingPanel
    I don't want this to be an x/y problem here. Can anyone point me in the right direction? 1. Does compose desktop actually support a webview? If so, maybe I missed that api completely? 2. If going the embeded swing route with a WebView is actually the best path forward, how do I get the import statement to resolve? I looked up if there is a maven artifact for swing in the same namespace as compose but came up empty handed.
    j
    i
    • 3
    • 2
  • g

    Glenn Martin

    02/12/2021, 12:07 PM
    what's the recommended way to have store locally, so something like localstorage for the purpose of keeping user config settings ect? thinking of pulling some data from a server but would like a way for the local user to store some config settings locally
    j
    a
    • 3
    • 6
  • a

    Anga Koko

    02/12/2021, 11:38 PM
    Can anyone help with this question on StackOverflow? https://stackoverflow.com/questions/66180290/aligning-a-resized-textfield-in-jetpack-compose
    j
    • 2
    • 5
  • g

    Glenn Martin

    02/13/2021, 6:28 AM
    The below is broken on latest build
    ScrollableColumn(modifier = Modifier.fillMaxSize()) {
                FlowRow(
                    mainAxisSpacing = 32.dp,
                    crossAxisSpacing = 32.dp,
                    crossAxisAlignment = FlowCrossAxisAlignment.Center,
    
                    ) {
                    getCard(0, "Redis")
                    getCard(1, "Prs-Mock")
                    getCard(2, "Searcher")
                    getCard(3, "DynamoDB")
                    getCard(0, "Redis")
                    getCard(1, "Prs-Mock")
                    getCard(2, "Searcher")
                    getCard(3, "DynamoDB")
    
                }
            }
    I've replaced to Lazycolumn and flow row -> LazyRow and getting the following errors,
    @Composable invocations can only happen from the context of a @Composable function
    d
    • 2
    • 1
  • g

    Glenn Martin

    02/13/2021, 6:29 AM
    everything here has a composable annotation so not sure what's the deal, your current sample projects still running on an older build, would be great if you could upgrade those so I can see the change
    j
    • 2
    • 5
  • a

    Arkadii Ivanov

    02/13/2021, 12:28 PM
    Are there any docs/resources for deep links? I need the app to run with arguments from the clicked link.
    r
    j
    • 3
    • 6
  • k

    Kshitij Patil

    02/14/2021, 8:42 AM
    Do we have paging library for desktop? Probably Kotlin Multiplatform?
    j
    t
    • 3
    • 18
  • y

    Yan Pujante

    02/14/2021, 1:41 PM
    Is there any project that demonstrates how to use compose with a database? I was going through the tutorials for jetpack compose (since compose desktop is based on that) and they use a LazyColumn when there are many items to make sure that only the visible ones are rendered. But what if the items were coming from a database? Not rendering them is certainly a win, but if you have to load them all that is a problem. How do you handle this kind of use case? I guess in other words, I am looking for an actual application, not a toy demo/tutorial...
    a
    r
    • 3
    • 6
  • y

    Yan Pujante

    02/14/2021, 6:50 PM
    where is the source code for compose-desktop? The repo on github (https://github.com/JetBrains/compose-jb) does not seem to contain the source code or am I missing something?
    a
    • 2
    • 2
  • g

    gbaldeck

    02/14/2021, 7:43 PM
    I haven't found a drop-down box or combo box component. Does one currently exist in compose?
    :yes: 1
    e
    s
    • 3
    • 3
  • t

    TheMrCodes

    02/15/2021, 1:45 PM
    If I scroll through a LazyColumn by emulating Touch (Drag-n-Drop) the scrolling studders and the fling animation is not visible. Is this intended behavior on Desktop or a bug? (Behaivior shown in video in the Thread)
    c
    i
    t
    • 4
    • 12
  • t

    theapache64

    02/15/2021, 2:16 PM
    Here's my second #ComposeDesktop app ☺️ ! Stackzy, A tool to identify platform and libraries used inside android applications ⚡ GitHub : https://github.com/theapache64/stackzy Spread the news https://twitter.com/theapache64/status/1361318434382876676 😉
    full_demo.mp4
    🎶 4
    🔥 27
    👌 6
    👍 13
    t
    r
    • 3
    • 14
  • b

    Big Chungus

    02/15/2021, 4:59 PM
    How do i create BufferedImage for app icon from png resource?
    • 1
    • 1
  • b

    Big Chungus

    02/15/2021, 5:11 PM
    ANyone got an example of a dropdown menu in compose desktop?
    g
    • 2
    • 7
  • b

    Big Chungus

    02/15/2021, 5:56 PM
    Hmm, Modifier.clickable() doesn;t seem to work on TextField
    TextField(
          value = value,
          onValueChange = {},
          readOnly = true,
          modifier = Modifier.clickable(role = Role.Button, onClick = {
            expanded = !expanded
          }),
          trailingIcon = {
            Icon(
              imageVector = if (expanded) Icons.Default.KeyboardArrowUp else Icons.Default.KeyboardArrowDown,
              contentDescription = "Localized description")
          }
        )
    Am I doing something wrong?
    g
    • 2
    • 2
  • m

    Messias Junior

    02/15/2021, 11:00 PM
    I just released a simple navigation library for navigation on compose-desktop. I really hope you enjoy https://github.com/app-outlet/karavel
    👍 6
    s
    • 2
    • 7
  • y

    Yofou

    02/16/2021, 4:01 PM
    Is there any reason when I have circle button with opacity an octogon apears inside?
    @Composable
    fun NavButton() {
        Button(
            onClick = {  },
            shape = CircleShape,
            modifier = Modifier.size(50.dp),
            colors = ButtonDefaults.buttonColors(
                backgroundColor = Color.Gray.copy(.25f),
                contentColor = Color.White
            )
        ) {
    //        Text("Test")
        }
    }

    https://i.gyazo.com/10d11bca3ece67959cc9a44ab6aa9667.png▾

    d
    k
    r
    • 4
    • 11
  • r

    Ryan

    02/16/2021, 4:12 PM
    Forgive my ignorance but would something like mlkit work with jetpack compose?
    k
    o
    • 3
    • 5
Powered by Linen
Title
r

Ryan

02/16/2021, 4:12 PM
Forgive my ignorance but would something like mlkit work with jetpack compose?
k

Kirill Grouchnikov

02/16/2021, 4:20 PM
This is very vague. Something like MLKit as in a library for machine learning? Or specifically that library? And what do you mean by "work"?
r

Ryan

02/16/2021, 4:24 PM
yea, sorry about that. does it have camera support?
webcam, etc.
o

olonho

02/16/2021, 4:38 PM
Compose is UI library, but you could use any JVM library in Compose for Desktop, i.e. https://stackoverflow.com/questions/11487251/best-way-to-access-web-camera-in-java
k

Kirill Grouchnikov

02/16/2021, 5:33 PM
Like, does ML Kit support camera integration on desktop? That would be a question for that project, not Compose
View count: 8