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

    Adriel Café

    12/21/2021, 12:34 PM
    FYI: Voyager navigator is now multiplatform! :compose-multiplatform::kotlin-intensifies: Thanks for your contribution @Konstantin Tskhovrebov! https://github.com/adrielcafe/voyager/
    👀 1
    :kotlinnew: 5
    🎉 11
    🤩 5
    r
    s
    +2
    5 replies · 5 participants
  • c

    Colton Idle

    12/21/2021, 2:39 PM
    I'm exploring the root cause, but after I upgraded to
    org.jetbrains.compose:compose-gradle-plugin:1.0.1-rc2
    I now get a crash in release mode (aka R8 enabled) of
    java.lang.IllegalAccessError: Method 'void android.view.View.onAnimationEnd()' implementing interface method 'void coil.target.Target.onAnimationEnd()' is not public (declaration of 'androidx.compose.ui.platform.AndroidComposeView'
    Anyone else encounter this by chance or know where would be the right place to file. Not sure if it's agp/r8/c4d/coil.
    t
    30 replies · 2 participants
  • g

    Glen

    12/21/2021, 3:22 PM
    Hello everyone. Please, I would like to know if someone has built some tooling( e.g Gradle plugin) for packaging a desktop compose app into an AppImage for universal distribution on all Linux-based systems. If not, what would it take to build one? Thanks.
    t
    5 replies · 2 participants
  • t

    Tianyu Zhu

    12/21/2021, 3:40 PM
    What is the idiomatic way of performing some heavy compute in the background while rendering in the foreground?
    b
    1 reply · 2 participants
  • d

    Dima Avdeev

    12/21/2021, 7:44 PM
    New Year animation on Compose for Desktop: https://github.com/avdim/compose-vector
    new-year-cat.mp4
    :kotlin-intensifies: 1
    🐱 7
    :jetpack-compose: 7
    🌠 2
    s
    m
    3 replies · 3 participants
  • d

    Dima Avdeev

    12/21/2021, 8:27 PM
    Also i recorded small video about:

    https://www.youtube.com/watch?v=FXYaigfuk38▾

    (Sorry for bad English)
    s
    2 replies · 2 participants
  • p

    Pavle Joksovic

    12/22/2021, 3:07 PM
    When I forward
    /Users/joksovic/ic_re_center_dark.svg
    to a
    painterResource
    I get
    Exception in thread "AWT-EventQueue-0 @coroutine#12" java.lang.IllegalArgumentException: Resource /Users/joksovic/ic_re_center_dark.svg not found
    what am I doing wrong?
    s
    m
    7 replies · 3 participants
  • h

    halirutan

    12/22/2021, 4:57 PM
    Merry almost Christmas everyone. I'm implementing a small prototype to draw time-series data into a coordinate-system using a Canvas. To give an example, look at the following graph to display financial data. My idea was to transform the viewport into the range of the data points so that I only have one transformation and I don't need to rescale possibly several thousand of data points. So my plan was: • Calculate the viewport transformation (scaling, translation) that depends on the range of the data and e.g. zoom level the user can change • Draw the data without having to re-scale it. Possibly using (hopefully) faster low-level
    drawVertices
    functions that don't call drawing functions over and over again, but work on arrays Now there are several obstacles. One is, if I scale the viewport, the glyphs of the fonts are also scaled but I think that can be solved rather easily. My question is, is there any example code that does something similar because most of the examples/tutorials only use transformations for animations? Even after a rather careful search, I couldn't find anything remotely related to what I try to do which is "plotting mathematical functions". If someone has hints or links how I could approach this or why my plan is destined to fail, I'm all ears.
    m
    3 replies · 2 participants
  • l

    leysont

    12/22/2021, 5:08 PM
    I just started using Compose Desktop and I don't seem to get scrolling working correctly. I have a column with a text and with another column that contains a list of self made buttons. Apparently the parent column scrolls automatically but if I code the nested column to be scrollable with Modifier.scrollable() then I can only scroll down but not up. If I restrict the height of the nested column so that the parent column does not automatically scroll then the nested column does not scroll either, not even with .scrollable. I want the nested column to scroll while the text is still visible. Am I doing something wrong or might this be a bug? This is all inside a DropdownMenu in case that matters.
    2 replies · 1 participant
  • g

    Glen

    12/22/2021, 6:42 PM
    Hello everyone. Please, I have another question: will skiko have Vulkan support in the future? I saw some code that seems to indicate it will probably be done, but is there any ETA on when? Thanks.
    o
    4 replies · 2 participants
  • g

    Grian

    12/22/2021, 7:18 PM
    Hello all! I was wondering how to make a
    TextField
    activated by default like when it has a value by default, i.e: attached picture, I'm using the builtin Material Theme
    m
    2 replies · 2 participants
  • o

    olonho

    12/23/2021, 3:49 PM
    yes, 1.0.1 is pretty much 1.0.0 with Kotlin 1.6.10 support
    🎉 8
    k
    1 reply · 2 participants
  • d

    David W

    12/23/2021, 6:08 PM
    Is there built-in support for drag-to-resize panels? Haven't been able to find anything about it on google.
    m
    t
    19 replies · 3 participants
  • h

    halirutan

    12/24/2021, 10:39 AM
    What if I want a simple 2x2 Row-Column combination where one of the rows/columns should have a fixed size and the other should fill the rest? Is there a simple way to do that?
    k
    3 replies · 2 participants
  • k

    Kirill Grouchnikov

    12/25/2021, 3:06 AM
    Going a bit deeper into Skia shaders in Aurora. When the regular canvas / drawscope APIs are not granular enough to express the visuals, such as gradients based on bezier curves or softly clipped rounded corners, shaders come to the rescue. On the left, you can see the "flat" gradients on buttons and comboboxes. On the right, using a custom shader to emulate a slight specular highlight on the same controls.
    ❤️ 11
    k
    1 reply · 2 participants
  • s

    soderbjorn

    12/25/2021, 9:00 PM
    In the Compose multi-platform template in the Jetbrains Compose repository, the common module seems to link to the Jetbrains implementation of Compose, while the Android module seems to link to actual Compose. This makes sense and is what I would expect, but why is the Android module set up in a somewhat unorthodox way, with e.g. no
    buildFeatures
    block, and a
    org.jetbrains.compose
    plugin? This breaks preview support in Android Studio (I'm aware Jetbrains provides their own preview plugin for Compose though, although I couldn't get it working due to some Kotlin incompatibility). Does this different setup imply that the Android module in a multi-platform project might always be one step behind Google and require "special treatment" to work? Compose for Desktop would be very compelling if the Android module could use the latest available features from the latest version of Google's Compose -- and take full advantage of all Android Studio features including preview -- even if of course desktop and web implementations would have to use the Jetbrains implementation which would not have complete feature parity. Maybe this is how it works? I could be misunderstanding something. (I'm very impressed by Compose for Desktop despite these questions / reservations, by the way. And Happy Holidays!)
    o
    1 reply · 2 participants
  • d

    David W

    12/27/2021, 1:58 AM
    Is there a way to detect if your composable is being rendered as a Preview? Akin to
    isInEditMode()
    from standard Android.
    👀 1
    o
    s
    +2
    10 replies · 5 participants
  • a

    Alexander Suraphel

    12/27/2021, 4:40 PM
    Is there a concept akin to webview in compose desktop?
    b
    d
    +3
    31 replies · 6 participants
  • l

    luen

    12/27/2021, 6:44 PM
    How change cursor when hover?
    d
    c
    2 replies · 3 participants
  • a

    Alexander Kurasov[JB]

    12/28/2021, 6:30 PM
    It turned out that Compose is good not only for UI building, but also for creating funny animations quickly. This one was created in two days with the most time spent on colors and effects playing with -

    https://www.youtube.com/watch?v=sf60rYZVPzQ▾

    HNY!
    ❄️ 5
    :jetpack-compose: 8
    d
    s
    7 replies · 3 participants
  • m

    maarten ha

    12/29/2021, 2:20 PM
    I’m currently trying to figure out to get some kind of dashboard on my tv with a raspberry pi zero w. The issue is that I have no clue how to run my desktop compose app on it. I tried to install the kotlin cli through the snap store but it doesn't support arm apparently. Is there a way to boot up the application on it and on after boot up?
    k
    s
    8 replies · 3 participants
  • a

    Ayfri

    12/29/2021, 9:24 PM
    It would be great to have a tool like the DevTools on Chrome for seeing every elements with its padding/margin/arrangement/other properties and to be able to see the delimitations etc I know it can be programmed with Compose but a plugin or a "debug mode" could be really great, is it planned ?
    ➕ 1
    s
    c
    2 replies · 3 participants
  • s

    SrSouza

    12/29/2021, 11:35 PM
    Hi folks, we are publishing Compose multiplatform library using the Jetbrains plugin and based on this https://blog.jetbrains.com/kotlin/2021/10/compose-multiplatform-goes-beta/#androidartifacts we are expecting that the result artifact would also be using the Google Compose artifact in the pom and this also correctly (https://repo1.maven.org/maven2/cafe/adriel/voyager/voyager-core-android/1.0.0-beta14/voyager-core-android-1.0.0-beta14.pom) but at the Gradle Module Metadata files this is not the case (https://repo1.maven.org/maven2/cafe/adriel/voyager/voyager-core-android/1.0.0-beta14/voyager-core-android-1.0.0-beta14.module). There is any plan to also replace on the gradle module metadata? (Here is a issue from the user of the library: https://github.com/adrielcafe/voyager/issues/34)
    1 reply · 1 participant
  • b

    benkuly

    12/30/2021, 10:37 AM
    Compose Desktop does not scale right on my high dpi gnome 40 wayland desktop.
    LocalDensity
    is 1, but it is set to 200% in Gnome Settings. Any ideas? It seems like there is no real high dpi support.
    o
    t
    4 replies · 3 participants
  • a

    Ali Albaali

    12/30/2021, 7:17 PM
    Does Material You work on desktop? By that I mean, can it pick the colors from the desktop wallpaper? 🤔 If it can't, will there be support for it in the future?
    s
    k
    +2
    7 replies · 5 participants
  • d

    David W

    12/30/2021, 10:40 PM
    I suspect there's an easy answer...I have a LazyRow of items of differing heights and I'm not sure how to align them to the bottom of the LazyRow.
    k
    8 replies · 2 participants
  • t

    Thomas

    12/31/2021, 1:30 AM
    Could Compose for Desktop please be rebased on https://android-review.googlesource.com/c/platform/frameworks/support/+/1900420? The new
    LazyVerticalGrid
    would be very useful for desktop applications.
    👍 1
    c
    a
    3 replies · 3 participants
  • a

    Ali Albaali

    01/04/2022, 3:21 PM
    Can anyone share a sample of an embedded browser in CFD?
    s
    2 replies · 2 participants
  • s

    spierce7

    01/05/2022, 6:55 PM
    If something like this is accomplished on Android, we would also get that on Desktop, and other canvas based platforms right? https://issuetracker.google.com/issues/160665122?pli=1
    c
    1 reply · 2 participants
  • s

    Sebastian Kürten

    01/06/2022, 9:29 PM
    In our project we're using a lot of
    mutableStateOf()
    and a background thread for potentially longer running tasks that deliver data and alter state variables. Now sometimes buttons etc. also write to such state variables. Now we're wondering about thread safety and what kind of synchronization mechanisms we might need. I realize the state handling and snapshots do a lot of heavy lifting for us, but it would be really nice to read some documentation about that. I find next to nothing on that topic in the compose docs: https://developer.android.com/jetpack/compose/documentation We have found Zach's series "Compose state explained" https://dev.to/zachklipp/series/12895 and the articles there are very insightful. Still I'm wondering if there might be other "official" resources such as docs on those topics that we might have missed?
    k
    2 replies · 2 participants
Powered by Linen
Title
s

Sebastian Kürten

01/06/2022, 9:29 PM
In our project we're using a lot of
mutableStateOf()
and a background thread for potentially longer running tasks that deliver data and alter state variables. Now sometimes buttons etc. also write to such state variables. Now we're wondering about thread safety and what kind of synchronization mechanisms we might need. I realize the state handling and snapshots do a lot of heavy lifting for us, but it would be really nice to read some documentation about that. I find next to nothing on that topic in the compose docs: https://developer.android.com/jetpack/compose/documentation We have found Zach's series "Compose state explained" https://dev.to/zachklipp/series/12895 and the articles there are very insightful. Still I'm wondering if there might be other "official" resources such as docs on those topics that we might have missed?
k

Kirill Grouchnikov

01/06/2022, 9:52 PM
This is better suited for the general #compose channel, since it's not desktop-specific
s

Sebastian Kürten

01/07/2022, 8:10 AM
right, good point, I'll repost there
View count: 3