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

    Alex Styl

    11/12/2022, 10:37 AM
    is there a contribution guide somewhere? like how to build compose on your machine for example? not sure where to start
    a
    i
    d
    • 4
    • 5
  • d

    Draget

    11/12/2022, 7:34 PM
    I am a beginner to compose. Working myself thought some tutorials and such so far, everything seems logical. Something I'd like to do, since I used to code some gameloops and drawing effects before: Draw manually (lines, pixels etc.) on some canvas. And I am not sure how this would work together. As I understand, overwriting a Painter would not be the right appraoch as the painting might be expensive - I expect my drawing to be the bottleneck for drawing perforance. So I should create a ImageBitmap, darw on there, and just display the Image? But then again, drawing on it would mutate the data , causing a recompose every time? I guess I would double-buffer…? Can someone give me a breadcrumb trail to follow? 😄
    r
    • 2
    • 8
  • a

    Alex Styl

    11/14/2022, 6:48 AM
    What is the scope of Jetpack Compose Desktop? I would love to have richer notification support in the jvm target (such as showing and dismissing notifications, and be able to customize their contents and sounds). is this something i can somehow request as a feature?
    m
    a
    i
    • 4
    • 5
  • a

    arekolek

    11/14/2022, 5:31 PM
    I’ll post this here, but maybe this is a question about #compose in general 🤔 but I haven’t tested on Android yet I have an issue with a reference to local function inside composable, see
    onValueChange = ::onValueChange
    in attached code for example If I run this code and type “a” in first field, then type “b” in second field, the output shows “b” Then if I type “c”, the output shows “a.bc” If I change that line to use a lambda
    onValueChange = { onValueChange(it) }
    then output shows “a.b” as soon as I type “b” in above example Are local functions, or references, or references to local functions not supported in composables? Or this is some bug I found? Or I’m just doing something wrong?
    Main.kt.cpp
    z
    • 2
    • 1
  • n

    Nino

    11/15/2022, 3:23 PM
    Hello, is there a way to have a FlexBox or similar in Compose Desktop ? Sadly, the Accompanist library is for Android only, not Desktop.
    k
    m
    m
    • 4
    • 4
  • m

    Moritz Post

    11/15/2022, 4:22 PM
    Is there any reasonable good navigation solution that can be shared among android, jvm and ios? something like androidx.navigation?
    m
    k
    c
    • 4
    • 16
  • n

    Nino

    11/15/2022, 4:24 PM
    Also, there's
    viewModel()
    function for injection in Android, is there a similar approach in desktop ?
    m
    • 2
    • 1
  • n

    Nino

    11/15/2022, 4:58 PM
    I'm lost, even compilation doesn't work (so it's not yet another Intellij Idea bug)... It's the same code as the "example" project. What am I missing ?
    a
    m
    • 3
    • 9
  • b

    benkuly

    11/16/2022, 3:21 PM
    Is there any update on this pull requests reagarding custom installers? https://github.com/JetBrains/compose-jb/pull/2331
    m
    • 2
    • 3
  • k

    Kirill Grouchnikov

    11/16/2022, 4:35 PM
    A sneak peek at how app content can be extended and integrated into the window title pane in the upcoming release 1.3 of Aurora
  • t

    Timo Drick

    11/19/2022, 12:18 AM
    I am searching for a solution to play mp4 video in CFD. Solutions like vlcj in the sample or using JavaFX with a JFXPanel do work but i can not draw on top of the video compose components. So it only works when there is no UI on top of the video. Do anyone know a solution to draw compose components ontop of a video player?
    d
    l
    • 3
    • 16
  • x

    xxfast

    11/19/2022, 1:56 AM
    Is there a multiplatform variant for
    material3:material3-window-size-class
    ?
  • a

    Alex Styl

    11/19/2022, 6:44 AM
    what does
    shortcut, menu and console
    do within the
    windows {}
    scope of
    nativeDistributions {}
    ?
  • a

    Alex Styl

    11/19/2022, 7:11 AM
    how can I change the app icon on windows? I tried setting the iconFile to an svg, and a png and even though the default icon changes to the old java icon, i dont see my icon
    t
    • 2
    • 2
  • a

    Alex Styl

    11/19/2022, 7:12 AM
    also, is it possible to start my app right after the installation process? I cannot find an option or customizations for that anywhere
  • a

    Alex Styl

    11/19/2022, 7:47 AM
    are there any free solutions (or self hosted) for auto-updating jetpack compose apps? I am aware that “anything that works for java apps should work for jetpack compose desktop” but I am looking for specifics
    l
    t
    +2
    • 5
    • 11
  • a

    Aleks Sek

    11/19/2022, 9:15 PM
    Hello, anyone aware of any good stock charting libs that can be used with CFD?
    s
    • 2
    • 3
  • d

    Daniyar Mukhanov

    11/21/2022, 5:14 AM
    Hi all, stuff like this
    androidx.compose.foundation.VerticalScrollbar
    can't be find in android. I am building shared ui for desktop/android and not sure how to handle this kind of problem
    t
    • 2
    • 1
  • v

    Vlad Ostaci

    11/21/2022, 10:24 AM
    https://blog.jetbrains.com/kotlin/2022/10/compose-multiplatform-1-2-is-out/#New_onClick_modifier How do I get the position of the Right click?
    Box(
      modifier = Modifier.onClick(
        matcher = PointerMatcher.mouse(PointerButton.Secondary), // Right Mouse Button
        onClick = {
          println("Right Click")
        }
      )
    ) {
      Text(text = "Right click on me", modifier = Modifier.align(Alignment.Center))
    }
    o
    k
    • 3
    • 13
  • c

    Casey Brooks

    11/21/2022, 6:15 PM
    Howdy folks, I’ve been recently hinting about a new Multiplatform Routing library that I’ve been working on, and I’ve now got a stable preview available for anyone who wants to check it out and provide early feedback. Links to documentation and examples can be found in the Ballast channel, and I’d love to hear your suggestions and criticisms before I officially publish it in a couple weeks.
  • e

    eygraber

    11/22/2022, 12:43 AM
    If I build an artifact with Jetbrains Compose 1.2.1 and consume it in an Android project using Jetpack Compose 1.4.0-alpha02 compiler (so I can update to Kotlin 1.7.21) will I run into any issues?
  • a

    Alex Styl

    11/22/2022, 8:20 AM
    has anyone distributed a Windows app? I am confused towards how to do it? Is it a matter of creating an exe or MSI package and then signing it?
    a
    m
    +2
    • 5
    • 16
  • e

    eygraber

    11/23/2022, 7:27 PM
    When I use Jetbrains Compose in Android Studio in an Android source set, and I use an
    @Preview
    is there any way to get it to use Android Studio's compose preview?
    d
    • 2
    • 26
  • r

    Raphael TEYSSANDIER

    11/23/2022, 7:49 PM
    Hello, how can we use the camera in desktop ?
    k
    • 2
    • 2
  • d

    Draget

    11/23/2022, 8:29 PM
    I would like to poke at pixels in a bitmap and draw it in compose. I have a canvas and try to draw an image with 'drawImage(img)' with an ImageBitmap. But the ImageBitmap seems to be read-only…? Any other ways to draw single pixel in compose?
    c
    k
    • 3
    • 14
  • l

    lhwdev

    11/24/2022, 12:32 AM
    I'm trying to make custom window with native behavior, so I'm discovering win32 apis. Can I use internal pointer hitTest logic of Compose?
  • e

    eygraber

    11/24/2022, 4:38 AM
    I'm overriding which Jetpack Compose artifacts are resolved in a multiplatform compose project by doing:
    configurations.configureEach {
      resolutionStrategy {
        eachDependency {
          val isCompiler = requested.group.endsWith("compiler")
          if(requested.group.startsWith("androidx.compose")) {
            if(!isCompiler) {
              useVersion(versionOverride)
            }
          }
        }
      }
    }
    Now that Jetpack Compose provides a BOM, what would be the best way to do this? Any chance that Jetbrains Compose can expose a property for setting the BOM version to use?
    d
    • 2
    • 6
  • s

    smallshen

    11/25/2022, 6:14 AM
    is compose layout phase and state update multi-threaded?
    r
    s
    l
    • 4
    • 16
  • c

    czuckie

    11/25/2022, 5:08 PM
    if I were interpreting 1,000s of x, y coordinates a second from a graphics tablet like device and trying to render the result in real time in compose, would I be completely insane wrong to use a mutableStateListOf Path objects? It feels like I want to go down a level, but I'm not sure how I'd do that. (I guess this isn't strictly :kotlin: either 🤡 )
    r
    • 2
    • 12
  • c

    Cody Mikol

    11/26/2022, 10:30 PM
    What is the correct way to accomplish this kind of layout? <Container> <A><Text/></A> <B/> </Container> Where B Takes up a fixed width A Takes up any remaining width Text clips if A is too small to fit all text
    f
    • 2
    • 6
Powered by Linen
Title
c

Cody Mikol

11/26/2022, 10:30 PM
What is the correct way to accomplish this kind of layout? <Container> <A><Text/></A> <B/> </Container> Where B Takes up a fixed width A Takes up any remaining width Text clips if A is too small to fit all text
f

Fudge

11/26/2022, 10:52 PM
How about
Row {
   A(Modifier.fillMaxWidth()) {
      Text()
   }
   B(Modifier.width(200.dp))
}
If not fillMaxWidth then weight(1f) might work
c

Cody Mikol

11/26/2022, 10:58 PM
That did the trick! thank you!
You've squashed the bug, you are a hero
Screencast from 11-26-2022 06:00:37 PM.webm
f

Fudge

11/27/2022, 4:31 AM
Lmao, that's pretty basic
View count: 10