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

    Ravi

    05/17/2021, 11:00 PM
    hi I'm using navigation compose & my requirement is to have startDestination as list or detail page. Got no issues with list but for detail I need to pass detail id, more in the thread
    i
    • 2
    • 18
  • z

    Zach Klippenstein (he/him) [MOD]

    05/17/2021, 11:08 PM
    Compose doesn’t differentiate between touch mode vs not-touch mode focus, right? Does Compose’s focus model just assume keyboard navigation isn’t a thing? I don’t see anything in the implementation of Material
    Button
    that interacts with the focus system.
    j
    l
    • 3
    • 10
  • f

    Fabio

    05/18/2021, 12:35 AM
    Hi, I'm running the
    AnimatingCircleTests
    from the
    Rally
    sample app, and after creating an emulator with 420 dpi I can't seem to troubleshoot the reason the tests are failing. According to the logs I tried creating there should be temporary files created at
    /data/data/com.example.compose.rally/files
    but that folder seems to never get created, so the question is • how should I compare the golden image to the actual screenshot generated during the test?
    • 1
    • 1
  • a

    Abhishek Dewan

    05/18/2021, 1:52 AM
    Wrote some thoughts on using Jetpack compose and how to think of UI’s in compose land 🙂. would appreciate feedback if any 🙂 https://learning-to-code.hashnode.dev/declarative-ui-in-android
    a
    • 2
    • 1
  • h

    HUONG

    05/18/2021, 4:10 AM
    Hi there! I am learning about Jetpack Compose. I read on Android pages, I see many advantages about it, but I haven’t implemented it in my project. I want to hear some points of you, guys. What do you thing about Jetpack Compose ? Should or shouldn’t use it in the further ? or Have any disadvantages about it ? … Thanks for your helps, guys. Happy coding.
    c
    • 2
    • 3
  • t

    Tlaster

    05/18/2021, 4:15 AM
    Does any having the issue
    java.lang.IllegalStateException: LayoutCoordinates androidx.compose.ui.node.InnerPlaceable
    after enabling accessibilty service when using compose beta05? Full stacktrace in thread
    a
    • 2
    • 4
  • q

    Quentin Dommerc

    05/18/2021, 6:45 AM
    👋 Just here to throw some random hope as the Google IO starts today 1️⃣ . 0️⃣ 👀
    a
    h
    +3
    • 6
    • 6
  • n

    Ngenge Senior

    05/18/2021, 8:31 AM
    Hello here. I have implemented paging with compose but instead of using LazyColumn, I wish to use a LazyVerticalGrid with two cells each.How do I use lazyPagingItems in LazyVerticalGrid?
    val lazyPagingNotes = viewModel.notes.collectAsLazyPagingItems()
    a
    k
    • 3
    • 6
  • i

    iamthevoid

    05/18/2021, 9:01 AM
    Advice please how to correctly establish typography in compose project for day-night theme if i want to use
    color
    parameter in each
    TextStyle
    ? I see next options 1. use resources and separate colors by folders. Good for theming, because all happens authomatically, but i don’t understand yet how to create Color from resource without @Composable
    colorResource
    2. use colors preset from kotlin code. In this case all variants that i can imagine leads multiple if-else cases Please, say, maybe i somehow skipped some obvious solution?
    m
    • 2
    • 7
  • n

    nitrog42

    05/18/2021, 9:47 AM
    Hey, I read this nice article : https://medium.com/androiddevelopers/migrating-from-livedata-to-kotlins-flow-379292f419fb but it made me realize I don't know how to do it in Compose. How does this integrate in a Compose world ?
    m
    • 2
    • 5
  • t

    Tin Tran

    05/18/2021, 10:23 AM
    Hi guys. How do I achieve 45deg angle gradient in compose?
    a
    • 2
    • 4
  • g

    Guilherme Delgado

    05/18/2021, 11:44 AM
    Hello, I’m having this issue when I change between dark/light theme:
    java.lang.NullPointerException: Attempt to invoke virtual method 'androidx.navigation.NavDestination$DeepLinkMatch androidx.navigation.NavGraph.matchDeepLink(androidx.navigation.NavDeepLinkRequest)' on a null object reference
    my setup is:
    setContent {
        val navController = rememberNavController()
        NavHost(navController, startDestination = NavRouting.Home.destination) {
            composable(NavRouting.Home.destination) { ... }
            ...
        }
        navigationManager.commands.collectAsState().value.also { command ->
            if (command.destination.isNotEmpty()) {
                navController.navigate(command.destination) { launchSingleTop = true }
            }
        }
    }
    Regarding navigation events with
    MutableStateFlow
    I was inspired by Joe Birch post. What am I doing wrong? 🤔 Thanks.
    i
    • 2
    • 3
  • j

    joney

    05/18/2021, 12:11 PM
    I'm looking for a way to synchronise scroll between multiple
    LazyColumns
    . All columns should receive the same scroll delta, regardless of where the user input came from. Is
    nestedScroll()
    the right thing to use?
    s
    a
    • 3
    • 10
  • d

    Deepak Gahlot

    05/18/2021, 1:06 PM
    Hello All, I'm facing a issue with the StateFlows in composable, for some reason the Stateflow is making the composable re-render infinitely even when there is no update to the value. Below is the code for the same
    • 1
    • 4
  • n

    natario1

    05/18/2021, 1:41 PM
    Do we have an estimated date for a 1.5.0 compatible release?
    b
    a
    • 3
    • 4
  • m

    Michal Klimczak

    05/18/2021, 3:12 PM
    I have a simple sign-in screen with two TextFields. When I press on either field, the layout scrolls up so that the field is above the Keyboard. So far so good. However, if I request focus with FocusRequester on the TextField (as a result of ImeAction.Next), the cursor moves to the right field, but the layout is not scrolled - the textfield is focused but hidden by keyboard. Any ideas how to cope with that? Compose 1.0.0-beta-06
    ➕ 1
    r
    • 2
    • 5
  • g

    Guilherme Delgado

    05/18/2021, 3:54 PM
    Hi! I’ve a
    Scaffold
    with a
    BottomAppBar
    (because I want the cutoutShape effect) and a few
    BottomNavigationItem
    (this also happened when I had
    BottomNavigation
    as a parent instead of
    BottomAppBar
    ) and the problem is there’s no “selected” effect on the menu items. I’ve checked and the var is being changed accordingly, but I see no UI change. To test it I did this (to my
    BottomNavigationItem
    icon
    and
    label
    ):
    colorFilter = ColorFilter.tint(MaterialTheme.colors.onBackground.copy(alpha = if (isSelected) 1f else .5f)),
    and it works. What am I missing to get this working properly with the
    selected
    property? Or the selected state is not meant for the item (icon and label)? Thanks
    l
    • 2
    • 15
  • s

    ste

    05/18/2021, 6:04 PM
    Does
    Modifier.zIndex
    imply a performance penalty?
    a
    • 2
    • 2
  • j

    julioromano

    05/18/2021, 7:02 PM
    beta07 is here: https://developer.android.com/jetpack/androidx/versions/all-channel
    🤔 2
    😄 2
    🎉 2
    s
    • 2
    • 2
  • c

    Cicero

    05/18/2021, 7:07 PM
    Hey my people, if anyone is interested, why isn’t there a more sure way to use this function:
    public fun NavGraphBuilder.composable(
        route: String,
        arguments: List<NamedNavArgument> = emptyList(),
        deepLinks: List<NavDeepLink> = emptyList(),
        content: @Composable (NavBackStackEntry) -> Unit
    ) {
    I was recently thinking about a way to make it more sure that all the variables would be more involved in a way that we could assure correct navigation. This came from a colleagues question about “if the route was different than the” called navigation path:
    const val toTest = "$TEST/{$TEST_VALUE}"
    fun test(testValue: Int) {
        navController.navigate("$TEST/$testValue")
    }
    Because of this I was thinking if we could have an object that would make this a more sure process. Does it make sense? Is my process incorrect? Accepting suggestions 🙂 My plan now would be to overwrite this NavGraphBuilder.composable function in a way that it would receive this object and that I could use this object instead of this loose variables 🙂
    i
    • 2
    • 1
  • c

    CLOVIS

    05/18/2021, 7:32 PM
    1.0 is announced for July ❤️
    :jetpack-compose: 7
    :kotlin-intensifies: 27
    👎 2
    :party-parrot: 6
    📆 7
    o
    a
    • 3
    • 4
  • j

    julioromano

    05/18/2021, 7:33 PM
    Wasn’t beta07 supposed to support kotlin 1.5.0?
    e: This version (1.0.0-beta07) of the Compose Compiler requires Kotlin version 1.4.32 but you appear to be using Kotlin version 1.5.0 which is not known to be compatible.  Please fix your configuration (or `suppressKotlinVersionCompatibilityCheck` but don't say I didn't warn you!).
    🇳🇴 2
    b
    n
    +2
    • 5
    • 9
  • s

    streetsofboston

    05/18/2021, 7:36 PM
    Did I hear this right? Has Compose for Wear OS been open-sourced?
    c
    a
    • 3
    • 2
  • a

    alorma

    05/18/2021, 7:51 PM
    great, Compose beta07 works with ArcticFox beta
    😮 3
    • 1
    • 1
  • a

    Anna-Chiara Bellini [G]

    05/18/2021, 7:53 PM
    There is one exciting update that you won't see in the release notes. Take a look at the new compose-material refdocs, with richer docs and images. Feedback is welcome, as we'll be working on updating the other packages too 🙂 https://developer.android.com/reference/kotlin/androidx/compose/material/package-summary
    😽 1
    🎉 34
    ❤️ 21
    💯 27
    a
    r
    z
    • 4
    • 3
  • j

    julioromano

    05/18/2021, 8:16 PM
    Android 12 has a new overscroll effect which works out of the box with existing apps. Compose views seem to be an exception though, they don’t get the new effect automatically. Will this require reimplementing the effect in the compose library in an upcoming version? https://developer.android.com/about/versions/12/overscroll
    👀 2
    😂 1
    a
    j
    +3
    • 6
    • 11
  • j

    John O'Reilly

    05/18/2021, 8:30 PM
    Any indication yet when we'll see Compose available for Wear OS?
    a
    a
    +4
    • 7
    • 17
  • r

    Ravi

    05/18/2021, 9:22 PM
    AnimatedVisibility(visible = true, initiallyVisible = false, enter = fadeIn()) { //<=beta06
    initiallyVisible
    is removed in
    beta07
    @ExperimentalAnimationApi
    @Composable
    fun AnimatedVisibility(
        visible: Boolean,
        modifier: Modifier = Modifier,
        enter: EnterTransition = fadeIn() + expandIn(),
        exit: ExitTransition = shrinkOut() + fadeOut(),
        content: @Composable() AnimatedVisibilityScope.() -> Unit
    ) {
        val transition = updateTransition(visible)
        AnimatedEnterExitImpl(transition, { it }, modifier, enter, exit, content)
    }
    z
    d
    • 3
    • 4
  • c

    Colton Idle

    05/18/2021, 10:22 PM
    Does this mean screenshot testing is going to be available to compose out of the box?
    c
    • 2
    • 3
  • f

    FunkyMuse

    05/18/2021, 10:41 PM
    Does beta07 support Kotlin 1.5.0?
    🇳🇴 9
    z
    • 2
    • 1
Powered by Linen
Title
f

FunkyMuse

05/18/2021, 10:41 PM
Does beta07 support Kotlin 1.5.0?
🇳🇴 9
z

Zach Klippenstein (he/him) [MOD]

05/18/2021, 10:42 PM
scroll up: https://kotlinlang.slack.com/archives/CJLTWPH7S/p1621366392073900
View count: 1