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

    Chris Fillmore

    09/01/2022, 6:29 PM
    Is there a generic-parameterized version of DropdownMenu like this? Kind of like
    LazyListScope.items()
    I have this function more or less, in my app. Would something like this ever land in the material package?
    • 1
    • 2
  • a

    Afzal Najam

    09/01/2022, 7:51 PM
    Reading this article about Flutter 3.3, I can’t help but wonder if Impeller is coming to Compose 🤔
    a
    a
    • 3
    • 16
  • f

    Finlandia

    09/01/2022, 8:55 PM
    Hi, is it possible to use entry/exit animations using Compose for Wear OS?
    a
    • 2
    • 2
  • j

    Joseph Hawkes-Cates

    09/01/2022, 9:43 PM
    I am working on a screen that has a Column where I need the height of each item in the Column to be the same. I’ve tried searching here and in SO and I’m not coming up with anything concrete. Does anyone have a good example or standard way of accomplishing this? More info in 🧵
    f
    • 2
    • 15
  • o

    Othman El Jazouli

    09/02/2022, 9:55 AM
    hey, does compose support gradient status bar? I know from
    com.google.accompanist:accompanist-systemuicontroller
    we can change single color
    val systemUiController = rememberSystemUiController()
    systemUiController.setStatusBarColor(Color.Gray)
    but can’t find for gradient in the screen I’m working on the background is gradient and can be animated to another gradient and I would like to have the same effect for the status bar
    t
    • 2
    • 2
  • n

    nuhkoca

    09/02/2022, 10:28 AM
    Hello, how do I animate the all items of
    LazyColumn
    ? I’d like to show/hide items with a neat animation(
    AnimatedVisibility
    preferably) but I can’t use
    @Composable
    in LazyList scope.
  • s

    ste

    09/02/2022, 1:24 PM
    I guess it may happen if you store the theme mode preference asynchronously and you set the dark theme as the default one (and the user preference is to pick the system theme mode). Edit: You said you stripped out SystemUiController, so this is not the case, whoops
    z
    a
    • 3
    • 14
  • k

    KotlinLeaner

    09/02/2022, 1:52 PM
    Hey guys, I want request a permission and I am looking in this stack overflow. Inside this question there is two answer which I am getting confused. First one is using Activity-compose and another is using Google Accompanist's Jetpack Compose Permissions. So which one is recommended way of doing? Can someone guide me on this. Many Thanks
    a
    • 2
    • 4
  • t

    Travis Griggs

    09/02/2022, 4:45 PM
    Colleague and I are playing with rewriting a screen of our app in Compose. For better or worse, we've been working our way "top down". As we convert more and more of the view to composables, the file starts to get pretty large. Is there a generally agreed strategy for how to organize lots of composables? One per file seems kind of redundant. But everything in one big file is also taxing my scrolling
    s
    c
    • 3
    • 2
  • a

    Aaron Waller

    09/02/2022, 5:44 PM
    I’m getting NPE when trying to build macrobenchmarks with jetpack compose.
    java.lang.NullPointerException: Attempt to invoke virtual method 'void androidx.test.uiautomator.UiObject2.setGestureMargin(int)' on a null object reference
    • 1
    • 3
  • t

    Travis Griggs

    09/02/2022, 6:23 PM
    Stumbling through various searches, it's unclear to me what the status of using SVG directly in compose is. 1. Do I need an additional library to do it? or is it part of the stock experience? Is it even possible? 2. It's not obvious (at least to me) how to add an svg file as a resource for the project in Studio. I tried just making an SVG directory under
    res
    and dragging files into there. But that didn't make R.SVG.resourcename automatically a thing The documenation/posts I do find seem to show some sort of evolution towards more and more supported. I'm just not clear on what the current snapshot is.
    f
    a
    +5
    • 8
    • 25
  • s

    Slackbot

    09/02/2022, 10:52 PM
    This message was deleted.
  • a

    AmrJyniat

    09/03/2022, 11:23 AM
    I have an Image inside a Box filling its whole size, when setting a background brush to the box modifier I get nothing because of the the image's
    fillMaxSize()
    . Code in 🧵
    o
    • 2
    • 5
  • z

    Zoltan Demant

    09/03/2022, 12:25 PM
    Im having a bit of an odd problem with compose and data updates! For example, if I tap a button that creates some data that I then navigate to using its id; the current screen will update to reflect the new data before the transition to the new screen is done. This looks a bit quirky, kind of unexpected; the only solution that comes to mind is to somehow pause data updates during navigation .. but that doesnt really seem like a good idea. Any other ideas? 🙂
    s
    i
    • 3
    • 6
  • o

    orangy

    09/03/2022, 1:17 PM
    Is
    derivedStateOf
    considered “changed” when any of its tracked states change, even if yielded value is the same?
    s
    i
    • 3
    • 13
  • n

    nuhkoca

    09/03/2022, 9:08 PM
    Does anybody have a good sample of decimal formatting using
    VisualTransformation
    ? 🙏
    m
    z
    • 3
    • 2
  • a

    Asad Mukhtar

    09/04/2022, 10:10 AM
    https://medium.com/@asadmukhtar28/viewpager-in-compose-84e5a3a55059
  • e

    Erfannj En

    09/05/2022, 1:27 PM
    #compose #android Hello, anyone know what is equivalent of
    TransitionManager.beginDelayedTransition(root)
    in compose??
    f
    • 2
    • 1
  • m

    mgrazianodecastro

    09/05/2022, 4:25 PM
    does anyone knows a good material on the architecture of jetpack compose? I mean something in more depth than the official docs, looking at the public APIs and how they work, so in case someone (like me) needs to build something new on top of it, one can feel more confident about getting in there
    a
    a
    • 3
    • 3
  • b

    Billy Newman

    09/05/2022, 4:32 PM
    Hello all. I am trying to get a heads up notification working in my compose app. AFAIK notifications live outside anything in compose. I have a notification working, however I am having trouble showing as a heads up notification. Would this have anything to do with compose?
    a
    • 2
    • 5
  • c

    Colton Idle

    09/05/2022, 8:09 PM
    I'm having trouble with this modifier that I've had in my codebase for a long time in production. It seems like I was relying on onSizeChanged to only be called once but now it's being called multiple times with the same value. This keeps on growing the value of totalSize until the app crashes (Crash:`Can't represent a size of 262368 in Constraints`)
    Modifier.onSizeChanged {
            Log.e("DEBUG", "height: ${it.height} and totalHeight: $totalSize")
            totalSize += it.height
    }
    E/DEBUG: height: 340 and totalHeight: 340 E/DEBUG: height: 340 and totalHeight: 680 E/DEBUG: height: 340 and totalHeight: 1020 ... then crashes All I'm trying to do is fine the height of a composable after it's been drawn so I know it's height in pixels. I'm confused because this wasn't happening in the past, but it seems like in alpha2 or alpha3 something changed?
    f
    f
    +2
    • 5
    • 17
  • m

    mgrazianodecastro

    09/06/2022, 1:06 AM
    Does anyone knows some guide lines on keyboard customization? I'm looking for the flexibility to remove some options (like not allowing emoji input in some scenarios), without the need to change the keyboard option (KeyboardType.Email would do it, but the layout is not the one I want to use).
  • k

    Kyant

    09/06/2022, 5:30 AM
    Monet 0.1.0-alpha02 is out. 🎉 👉 https://github.com/Kyant0/Monet • Fixed README typo (Sorry for my carelessness) • Update API to compose flavor • Added an Android demo
  • a

    Alex

    09/06/2022, 6:42 AM
    Hey all, I am trying to provide a local padding via
    ModifierLocal
    but the padding does not seem to apply. I could not find much documentation on
    ModifierLocal
    or any tutorials, hope you can point me in the right direction, code in 🧵
    • 1
    • 2
  • a

    Alexander

    09/06/2022, 7:55 AM
    Hello everyone, can anyone come across the fact that when embedded in compose NativeAdView, the onImpression function is not called sometimes?
  • t

    Tin Tran

    09/06/2022, 8:42 AM
    Has anyone tried to implement overlap style like this in compose?
    a
    • 2
    • 6
  • c

    Charles Jo

    09/06/2022, 11:53 AM
    Hi everyone, does anyone have experience in getting all compose views from activity or fragment?
  • d

    dimsuz

    09/06/2022, 1:48 PM
    I had a custom layout like this:
    fun MyLayout(someState: Int) {
      Layout(content) { measureables, constraints -> 
        if(someState) thisLogic() else thatLogic()
      }
    }
    It updates layout whenever
    someState
    changes, but now I want to factor out MeasurePolicy into a separate class (there will be several of them):
    fun MyLayout(someState: Int) {
      val policy = remember { MyMeasurePolicy({ someState }) }
      Layout(content, policy)
    }
    class MyMeasurePolicy(private val someState: () -> Int)) : MeasurePolicy
    I have made
    someState
    into a "provider lambda" to avoid recreating policy on each
    someState
    change (it will change more or less often). But now my layout is not re-measured when
    someState
    changes. Any hints on how to do this right?
    s
    a
    s
    • 4
    • 9
  • s

    Stylianos Gakis

    09/06/2022, 3:33 PM
    It should work. Does
    AppState
    itself change, or some internal state of
    AppState
    ? If it’s internal state, is that defined as a
    MutableState
    or a simple
    var
    ? A peek inside your
    AppState
    would make it easier to debug.
    a
    r
    • 3
    • 7
  • s

    ste

    09/06/2022, 4:47 PM
    Compose apps seem to ignore the device system font - they just pick the default one (tested on emulator and real device). Is this a know missing feature? I can't find the related issue on the issue tracker
    c
    s
    g
    • 4
    • 6
Powered by Linen
Title
s

ste

09/06/2022, 4:47 PM
Compose apps seem to ignore the device system font - they just pick the default one (tested on emulator and real device). Is this a know missing feature? I can't find the related issue on the issue tracker
c

Chris Sinco [G]

09/06/2022, 6:04 PM
cc @Sean McQuillan [G] @Siyamed
s

Siyamed

09/06/2022, 6:07 PM
What is a device system font? Or the difference between device system font and default?
g

gian

09/07/2022, 8:35 AM
Isn't that a vendor-specific feature? I don't think it's in stock android 🤔
s

Siyamed

09/07/2022, 2:27 PM
@ste can you please create a ticket for this? As Gianmarco mentioned it is a device specific feature that might need integration with compose. I do not know how feasible it is and it is possible that it won't be done anytime soon.
s

ste

09/07/2022, 2:59 PM
https://issuetracker.google.com/issues/245363152
s

Siyamed

09/07/2022, 3:20 PM
Thank you
View count: 4