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

    jim

    07/14/2021, 6:37 PM
    Maybe we get back to the topic of this channel though?
    :yes: 7
    👍 3
    l
    a
    • 3
    • 2
  • c

    Colton Idle

    07/14/2021, 6:58 PM
    Yes... back on topic. I'll start. Is compose ready for production? /s
    :lol: 1
    :also-yes: 4
    :kotlin-intensifies: 2
    :oh-yeah: 2
    😂 5
    🧵 3
    ❤️ 1
    a
    o
    • 3
    • 2
  • n

    natario1

    07/14/2021, 7:12 PM
    Has anyone tried to manage pages of a Pager (or similar component) as navigation destinations? I'm looking at the bottom sheet navigator PR for inspiration and feel like it could work, but I'm not sure if it's really worth the effort, as opposed to keep this part out of navigation and write ugly glue code.
    i
    • 2
    • 7
  • s

    Sanendak

    07/14/2021, 10:00 PM
    Hello guys! I want to collect shared flow from viewModel, but it works only one time.
    val scope = rememberCoroutineScope()
    
    LaunchedEffect(scope) {
            viewModel.effect.collect {
                when(it) {
                   is ShowEffect1 -> //Runs first from VM and shows
                   is ShowEffect2 -> //Runs after and doesn't run here
                }
            }
        }
    In ViewModel:
    private val _effect = MutableSharedFlow<CharactersScreenEffect>()
    val effect = _effect.asSharedFlow()
    I don't want to use .asStateFlow because it need initial state.
    z
    • 2
    • 10
  • m

    Mia Clapham

    07/14/2021, 10:39 PM
    Hi there, I keep getting this error
    Could not GET '<https://kotlin.bintray.com/kotlinx/androidx/lifecycle/lifecycle-viewmodel-compose/1.0.0-rc02/lifecycle-viewmodel-compose-1.0.0-rc02.pom>'. Received status code 403 from server: Forbidden
    Disable Gradle 'offline mode' and sync project
    I tried RC1 as well with the same result and Bintray says it's up and operational. Is anyone else facing this issue?
    j
    i
    t
    • 4
    • 3
  • m

    mp

    07/14/2021, 11:33 PM
    I’ve been playing around with
    AnimatedContent
    for screen transitions and I seem to have hit a road block.
    ContentTransform
    is restricted to fades, slides, and size changes, so I don’t see a way to use this for something more complex that uses child elements. Ex: fade the screen background in, then fade the content in. A more extreme example would be a shared element transition. Is the
    AnimatedContent
    API meant to be used for things like this, or is there another more general API that could be used?
    :android-wave: 1
    l
    a
    +2
    • 5
    • 9
  • c

    Chuck Stein

    07/15/2021, 3:36 AM
    Using a Navigation Compose deep link, is it possible to pop destinations off the synthetic back stack, as if we navigated to the deep link's destination using popUpTo inclusive?
    a
    i
    • 3
    • 7
  • a

    Ayfri

    07/15/2021, 4:07 AM
    Hi, how can I make a button shake when I click on it ?
    l
    j
    • 3
    • 43
  • a

    Adib Faramarzi

    07/15/2021, 4:55 AM
    Has anyone encountered this issue? I'm trying to do `
    composeView.setContent {
        Text(text = "WELCOME TO COMPOSE!")
    }
    and I get a runtime error
    java.lang.NoSuchMethodError: No virtual method setContent(Lkotlin/jvm/functions/Function0;)V in class Landroidx/compose/ui/platform/ComposeView; or its super classes (declaration of 'androidx.compose.ui.platform.ComposeView' appears in /data/app/taxi.tap30.passenger.debug--kKKwSbfzrf377VbKRnzSQ==/base.apk)
    c
    t
    +7
    • 10
    • 36
  • l

    Lukas

    07/15/2021, 7:39 AM
    Hi, I've got a problem with character rendering. I'm loading some text via Retrofit, which contains html-escaped umlauts (charset is ISO-8859-1). Locally I replace these with
    Html.fromHtml()
    , but instead of showing their corresponding umlauts, I just get these question mark diamonds, as shown in the picture. I assume this is a charset problem, but I couldn't find any information on how to set a specific one in compose.
    t
    • 2
    • 2
  • g

    grandstaish

    07/15/2021, 9:48 AM
    Is there an IdlingResource implementation for RxJava2 schedulers?
    ➕ 1
    • 1
    • 2
  • p

    Peter Mandeljc

    07/15/2021, 10:21 AM
    how can I receive image uri into my app? Do I need to receive Intent in my activity, and somehow send it to NavHost?
    i
    • 2
    • 16
  • c

    Cicero

    07/15/2021, 10:59 AM
    And then I wrote a timer:
    ➕ 1
    • 1
    • 1
  • y

    Yuri Drigin

    07/15/2021, 1:02 PM
    Does
    rc2
    still have this problem with compose preview?
    The following classes could not be found: - androidx.compose.ui.tooling.preview.ComposeViewAdapter (Fix Build Path, Edit XML, Create Class)
    :yes: 4
    c
    a
    • 3
    • 2
  • d

    dave

    07/15/2021, 1:52 PM
    hey there guys! Anyone with experience on nesting a LazyColumn within a NestedScrollView so that we keep the app bar behavior working? We get this
    java.lang.IllegalStateException: Nesting scrollable in the same direction layouts like LazyColumn and Column(Modifier.verticalScroll()) is not allowed. If you want to add a header before the list of items please take a look on LazyColumn component which has a DSL api which allows to first add a header via item()
    ➕ 1
    z
    a
    +2
    • 5
    • 9
  • m

    MBegemot

    07/15/2021, 3:07 PM
    Dialog size is again limited in rc2 or am I wrong?
    a
    c
    • 3
    • 3
  • o

    Orhan Tozan

    07/15/2021, 3:23 PM
    Inside a Column, that has 3 elements with 2 of them having fixed height, how can I let the 3rd fill the remaining space BUT with a max height of x? I tried .heightIn(max = x ) with .weight(1f) but it seems that the max height doesn't seem to affect when weight is specified.
    a
    • 2
    • 1
  • z

    Zun

    07/15/2021, 4:43 PM
    Is there a nicer way of underlining a "subtitle2" other than
    .subtitle2.merge(TextStyle(textDecoration = TextDecoration.Underline))
    b
    • 2
    • 4
  • d

    Dominaezzz

    07/15/2021, 9:46 PM
    I'm currently having an issue with scrolling in
    LazyColumn
    where it keeps snapping back https://github.com/JetBrains/compose-jb/issues/800 . I couldn't create a small reproducer so I've decided to just debug it myself. I've tracked it down to the
    measureLazyList
    function, which is where scroll is consumed but it's really big 😩 , any idea for what I should look for or how to narrow it down?
    💪 1
    z
    • 2
    • 2
  • t

    tad

    07/16/2021, 12:37 AM
    I think @Adam Powell might have something to say about this article: https://medium.com/google-developer-experts/jetpack-compose-missing-piece-to-the-mvi-puzzle-44c0e60b571
    a
    d
    +2
    • 5
    • 47
  • t

    Tash

    07/16/2021, 2:53 AM
    Using
    AnimatedVisibility
    & trying to dynamically update the transition values by calculating them based on mutable states; so, when a component enters/exits the enter/exit animation can be different every time. Just wanted to get some feedback on the approach 🧵
    d
    • 2
    • 6
  • k

    kevindmoore

    07/16/2021, 4:19 AM
    I think I might be going crazy but I keep commenting out Compose code and when I rerun the app, it still shows code from awhile ago
    😨 1
    j
    t
    +3
    • 6
    • 12
  • g

    Gaurav Tyagi

    07/16/2021, 4:43 AM
    Hi
    editTextPhone.setKeyListener(DigitsKeyListener.getInstance("0123456789"));
    how can achieves it in compose edit text
    z
    • 2
    • 3
  • a

    Abhishek Dewan

    07/16/2021, 6:55 AM
    Hey everyone, I have been experimenting trying to write a custom theme composable quite similar to how Jetcaster Sample App is implementing it. In order to help debug areas that I might have missed applying my custom theme color, I've made all of my Material colors to a bright yellow. Now the problem I've seeing is that when I have a simple NavHost that hosts multiple screens and I move between the screen, the bright yellow color I've set flashes for a second before my custom theme colors take over (as you may be able to see in the video). Is this a bug or is this how it was intended to be ?
    issue.mp4
    ➕ 1
    t
    • 2
    • 4
  • r

    Ravi

    07/16/2021, 11:30 AM
    hi I’m facing recomposition issue, more in 🧵
    m
    • 2
    • 6
  • m

    ms

    07/16/2021, 12:30 PM
    AnimatedVisibility
    is not getting shown even
    mutableStateOf
    is true Code in 🧵
    t
    • 2
    • 3
  • p

    Peter Mandeljc

    07/16/2021, 12:47 PM
    is it possible to vertically center
    Text
    if you set it specific height, if you set
    Modifier.defaultMinSize(100.dp)
    ?
    a
    • 2
    • 3
  • k

    Karthick

    07/16/2021, 1:44 PM
    I was trying to animate offset of a item, like the image below. But the next item is not following it and leave a gap. Am using
    Offset
    modifier. Anyone know how to animate the item without next item having gap
    • 1
    • 1
  • s

    Socheat KHAUV

    07/16/2021, 3:01 PM
    anyone know how to make Button become focusable ? I write a simple app on Android TV, I am not able to use controller navigate to button and do a click.
    k
    • 2
    • 1
  • g

    Gil Sinclair-Julio

    07/16/2021, 3:55 PM
    👋 we've noticed ripples drop a lot more frames than the classic android implementation. I presume it's because they're not drawn on the render thread? Are there any plans to improve this? It's a bit of a blocker for us to migrate to compose as it feels a lot less 'native'.
    a
    • 2
    • 6
Powered by Linen
Title
g

Gil Sinclair-Julio

07/16/2021, 3:55 PM
👋 we've noticed ripples drop a lot more frames than the classic android implementation. I presume it's because they're not drawn on the render thread? Are there any plans to improve this? It's a bit of a blocker for us to migrate to compose as it feels a lot less 'native'.
a

Andrey Kulikov

07/16/2021, 4:02 PM
Ripples are drawn on the render thread. it is using RippleDrawable under the hood
g

Gil Sinclair-Julio

07/16/2021, 4:04 PM
Ah I see 🤔 there is definitely an issue but it might be with our impl, I'll have a better look I'm not using the latest version of compose so it might be that too
Anyways thanks! I might message back if I find anything
a

Andrey Kulikov

07/16/2021, 4:08 PM
It was introduced in 1.0.0-beta06
g

Gil Sinclair-Julio

07/16/2021, 4:12 PM
Ah that makes sense, we are on 1.0.0-beta02
a

Andrey Kulikov

07/16/2021, 4:22 PM
yeah, in general it is recommended to update to the latest version before reporting any issues as we fixed really a lot of issues since beta02
👍 1
View count: 3