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

    Steve

    05/12/2021, 10:56 AM
    Hi Is there something similar to
    val interactionSource = remember { MutableInteractionSource() }
    val focused = interactionSource.collectIsFocusedAsState()
    in the dekstop version to find if the TextField has the focus?
    t
    • 2
    • 1
  • j

    Jiri Bruchanov

    05/12/2021, 8:46 PM
    Hi, anyone who would know what's wrong in following example with OutlinedTextField ?
    t
    • 2
    • 3
  • m

    Minecraaftt

    05/13/2021, 3:30 AM
    Hi, does anyone know if it is possible to make a jar executable for compose application? I've tried to, but it doesn't seem to work
    o
    • 2
    • 4
  • k

    Kirill Grouchnikov

    05/15/2021, 4:05 AM
    Progress update on https://github.com/kirill-grouchnikov/aurora which aims to provide a versatile set of desktop-quality components for Compose. Now with scroll bars, editable text fields, styled labels, resizable undecorated windows and more.
    👍 26
    :kotlin-intensifies: 21
    👌 4
    👏 4
    e
    • 2
    • 3
  • j

    Jacob Bosco

    05/16/2021, 5:23 AM
    Is the preview window available for compose desktop on Intellij Idea?
    c
    s
    • 3
    • 3
  • m

    Minecraaftt

    05/16/2021, 10:08 PM
    Is there a component that splits the screen horizontally/vertically with x amount of components, and has bars between them that allow you to resize them in jetpack compose by default or do I have to make it
    i
    • 2
    • 1
  • t

    Tlaster

    05/17/2021, 10:29 AM
    Just wonder can we create Compose project from cmdline like what
    flutter create
    does ?
    t
    • 2
    • 6
  • d

    Dr ET

    05/17/2021, 4:16 PM
    I am looking for components that can be used to create a DataTable and a TreeView using compose for desktop. Is compose for desktop still in the development phase or do you have to create your own components?
    c
    • 2
    • 1
  • d

    Dirk Hoffmann

    05/17/2021, 8:14 PM
    WITH the Box and VerticalScrollbar the Footer below the Column is (almost) not visible. (below window or whatever component I put it in, lower footer will be cut as in the screenshot) If I remove the Box and the VerticalScrollbar and only have the Column with the scrollbar inside the Column everything is fine ... any ideas why?
    @Composable
    fun VanillaRootContent() {
        val floatingPopup: MutableState<Boolean> = mutableStateOf(true)
    //    Card(Modifier.size(350.dp, 175.dp)) {
            Column(
                Modifier.border(1.dp, MaterialTheme.colors.onBackground).background(MaterialTheme.colors.secondary)
            ) {
    
                Footer(floatingPopup)
    
                val verticalScrollState = rememberScrollState(0)
                Box(Modifier.fillMaxWidth()) { // <-- remove
                    Column(modifier = Modifier.verticalScroll(verticalScrollState)) {
                        for (i in 1..16) {
                            Text("LAST$i", style = MaterialTheme.typography.body2)
                        }
                    }
                    VerticalScrollbar( // <-- remove
                        adapter = rememberScrollbarAdapter(verticalScrollState),
                        modifier = Modifier.align(Alignment.CenterEnd),
                        style = LocalScrollbarStyle.current.copy(unhoverColor = Color.Gray.copy(alpha = 0.5F))
                    )
                } // <-- remove
    
                Footer(floatingPopup)
            }
    //    }
    }
    
    @Composable
    private fun Footer(floatingPopup: MutableState<Boolean>) {
        Row(Modifier.border(2.dp, Color.LightGray), verticalAlignment = Alignment.CenterVertically) {
            Spacer(Modifier.weight(1f))
            Text("floatingWithCursor", Modifier.padding(2.dp), style = MaterialTheme.typography.body2)
            Checkbox(
                floatingPopup.value,
                onCheckedChange = { floatingPopup.value = !floatingPopup.value },
                colors = CheckboxDefaults.colors(checkedColor = MaterialTheme.colors.onBackground)
            )
        }
    }
    i
    • 2
    • 17
  • s

    SrSouza

    05/17/2021, 8:15 PM
    Hi folks, anyone was able to use Compose Compiler plugin in a Maven project? Any hint on how can I do it?
    r
    • 2
    • 1
  • s

    SrSouza

    05/17/2021, 11:08 PM
    Hi folks, I'm trying to add compose compiler to maven project and I getting this error:
    The provided plugin androidx.compose.compiler.plugins.kotlin.ComposeComponentRegistrar is not compatible with this version of compiler
    [full stacktrace in thread & pom]
    r
    i
    • 3
    • 6
  • s

    Skovisen

    05/18/2021, 9:50 PM
    Is it just me or are components styled with material theme by default? I’m struggling with styling text fields.
    z
    c
    • 3
    • 5
  • b

    Bruno Blazinc

    05/19/2021, 1:39 PM
    I am trying to notarize my app for Mac OS(
    notarizeDmg
    task), but I keep getting this error:
    Your Apple ID account is attached to other providers. You will need to specify which provider you intend to submit content to. Please contact us if you have questions or need help. (1627)
    I have asked the account holder to create the Developer ID certificate, but I have finished the rest of the steps(create App ID, create app-specific password) with my own account. Anyone know what could be the issue?
    o
    a
    • 3
    • 9
  • s

    SrSouza

    05/19/2021, 1:49 PM
    Hi folks, I saw that 1.5.0 kotlin update was merged on AOSP (https://android-review.googlesource.com/c/platform/frameworks/support/+/1651538) anyone have any idea when we will see a build on Compose Desktop supporting Kotlin 1.5.0?
    🚀 4
    👀 3
    p
    h
    +4
    • 7
    • 8
  • b

    Bruno Blazinc

    05/20/2021, 8:59 AM
    Can anybody confirm that they have successfully run and Mac app and which Java JDK they have used? I am getting and error with my app regarding the
    libjli.dylib
    packaged inside the the app(_full path inside app is.app/Contents/runtime/Contents/Home/lib/libjli.dylib_). The error is:
    not valid for use in process using Library Validation: mapping process and mapped file (non-platform) have different Team IDs
    It seems to me that the file is related to the Java JDK so I was wondering if somebody could point me to the JDK that is known to work so I can test it.
    o
    d
    • 3
    • 10
  • k

    kevin

    05/20/2021, 10:30 AM
    Does anybody know if it’s possible to change the application name on the mac menubar in ComposeDesktop, rather than have it always display the mai class name?
    j
    • 2
    • 3
  • d

    Daniele B

    05/20/2021, 5:32 PM
    I am a bit confused: is Compose for Desktop running on JVM for all 3 OS: Windows, Linux, MacOs?
    :yes: 6
    j
    j
    +4
    • 7
    • 23
  • l

    lazt omen

    05/21/2021, 11:38 AM
    Any idea on how to restore the embedded media player after a rerender? I get the audio playing in background but the video is lost
    j
    • 2
    • 7
  • d

    Dirk Hoffmann

    05/21/2021, 3:54 PM
    In compose-jb/components there is a
    @Composable SplitPane
    will this (or something similar) be available in compose-desktop? (why isn't it already if it is there?) just asking ... not complaining.
    i
    • 2
    • 1
  • k

    Kirill Grouchnikov

    05/21/2021, 5:51 PM
    Nom nom
    😂 19
    🕵️ 39
    :youtrack: 1
    🕵️🏻 1
    😇 1
    🕵️🏼 4
    r
    d
    • 3
    • 2
  • d

    Daniele B

    05/22/2021, 5:31 PM
    Is
    Scaffold
    just an Android thing? Is there an equivalent on Desktop and Web?
    j
    c
    • 3
    • 7
  • l

    lazt omen

    05/22/2021, 9:13 PM
    Is there a Stack Layout for placing childrens on top of each other?
    f
    a
    z
    • 4
    • 6
  • s

    sonder-joker

    05/23/2021, 7:05 AM
    Are there any documents/articles about the introduction of the Snapshot system architecture? I tried to read some source but some places are hard to understand and I don't really understand how it combine with state
    j
    c
    • 3
    • 2
  • r

    ron

    05/23/2021, 12:47 PM
    http://ronsmits.org/2021/05/compose-for-desktop/
    👍 5
    🎉 3
    👍🏻 1
    c
    f
    • 3
    • 4
  • c

    Christian Babsek

    05/24/2021, 9:50 AM
    Hello, I have a question concerning Compose Desktop. Is it possible to receive global keyboard events for a whole window (like for a simple game)? I found no way to actually receive the events, neither with
    .onKeyEvent
    , nor with
    .shortcuts
    . Thank you very much
    k
    • 2
    • 4
  • d

    Dirk Hoffmann

    05/24/2021, 11:54 AM
    I am trying to do my own Custom Layout following the source code of
    Scaffold
    . On putting in only unbounded content Components (like just a single
    Text()
    still the surface is "eating up" all available width and height. Why is this? (fully self-contained minimal executable code in the thread -->)
    i
    • 2
    • 5
  • e

    Erlan Amanatov

    05/24/2021, 4:02 PM
    Is there a way to change a width of the
    drawer
    in
    Scaffold
    or
    ModalDrawerLayout
    ? It takes almost all screen when opened
    🙏 2
    👀 3
    b
    • 2
    • 1
  • d

    Denis Capkovic

    05/24/2021, 5:23 PM
    👋 I am having problem selecting Text I render inside a LazyColumn. Is this a limitation of compose-desktop, or am I doing something wrong. I am using
    0.4.0-build209
    .
    d
    • 2
    • 2
  • s

    Sololo

    05/25/2021, 5:51 AM
    OutlinedTextField(
            modifier = Modifier.fillMaxWidth(),
            value = text,
            onValueChange = { text = it },
            label = { Text("please input sth.") },
            trailingIcon = {
                Icon(Icons.Filled.Delete, contentDescription = "", modifier = Modifier.clickable(onClick = 
                }))
            }
        )
    t
    j
    t
    • 4
    • 20
  • k

    Kirill Grouchnikov

    05/25/2021, 12:13 PM
    Build
    0.4.0-build210
    is out with support for Kotlin 1.5.0
    :kotlin-intensifies: 20
    i
    c
    d
    • 4
    • 5
Powered by Linen
Title
k

Kirill Grouchnikov

05/25/2021, 12:13 PM
Build
0.4.0-build210
is out with support for Kotlin 1.5.0
:kotlin-intensifies: 20
i

Igor Demin

05/25/2021, 1:58 PM
And
0.4.0-build211
with support for Kotlin 1.5.10 🙂
:kotlin-intensifies: 13
😍 2
c

Colton Idle

05/25/2021, 6:32 PM
Not super familiar with how the versioning works. github shows 0.3.2. Is that the latest release, and 0.4.0-build211 is a snapshot of sorts?
i

Igor Demin

05/25/2021, 6:35 PM
0.3.2 - the latest stable (M3) 0.4.0-build211 - the latest weekly (androidx-main snapshot)
👍 1
d

Dirk Hoffmann

05/25/2021, 11:42 PM
I have TextFields with
onFocusChanged = { focusState ->
    visible = focusState == FocusState.hasFocus
},
(has been
FocusState.Active
) Funnily IDE gives me code completion for
hasFocus
but still pretends that it does not exist:
Unresolved reference: hasFocus
any ideas?
i

Igor Demin

05/26/2021, 7:54 AM
but still pretends that it does not exist
You should use this:
visible = focusState.hasFocus
hasFocus
is not a static field 🙂
✅ 1
View count: 5