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

    Bacho Kurtanidze

    11/27/2019, 12:07 PM
    hey guys, I cloned official jetpack compose sample from github. it lacks back press functional and I want to add it by myself. is there any recommended ways that can I use?
    a
    z
    • 3
    • 3
  • r

    Roar Gronmo

    11/29/2019, 12:57 PM
    Have anyone a suggestion on how to mimick the XML ImageView's android:scaleType="fitCenter" in JetPack Compose ? Have tried to wrap a DrawImage in a Container with a dedicated size (i.e 40.dpx40.dp), for all my square images, this seems ok, but on images which is either higher or wider, the image doesn't resize so it fits into the square, it gets cut off either in height or in width. It should also keep its aspect ratio if it resizes.
    Container(
                                    width = 40.dp,
                                    height = 40.dp
                                ) {
                                    DrawImage(image)
                                }
    RG
    a
    z
    • 3
    • 17
  • n

    nglauber

    12/02/2019, 5:11 AM
    Dumb question: how to close the keyboard when the user press the imeAction button in a
    TextField
    ?
    TextField(
        value = text.value,
        keyboardType = KeyboardType.Text,
        imeAction = ImeAction.Done,
        onImeActionPerformed = {
            // TODO how to close the keyboard?
        },
        onValueChange = { s -> text.value = s }
    )
    👍🏻 1
    k
    • 2
    • 2
  • s

    Slackbot

    12/02/2019, 5:15 AM
    This message was deleted.
    n
    y
    • 3
    • 2
  • r

    Roar Gronmo

    12/02/2019, 10:50 AM
    According to material.io buttons should show text in ALLCAPS to emphasize (especially textbuttons), but when testing the JetPack Compose Button styles i cannot see that particular style has been applied to Button. Or do I have to capitalize the text myself (Not quite right after the material.io guidelines though...) Any suggestions ?
    a
    l
    f
    • 4
    • 7
  • r

    Roar Gronmo

    12/02/2019, 1:35 PM
    I am missing the ability to add an image to the ContainedButtonStyle button, which is/was possible in the XML's <Button style="@style/Widget.MaterialComponents.Button.Icon" app:icon="@drawable/my_edit_pen"/>, or do I need to design my own material IconContainedButton (I'd rather not).
    l
    • 2
    • 7
  • n

    nglauber

    12/02/2019, 10:57 PM
    Is there a better way to do this?
    Text(
        text = "H4 Primary!",
        style = +themeTextStyle {
            h4.copy(
                color = +themeColor { 
                    primary 
                }
            )
        }
    )
    l
    • 2
    • 1
  • r

    Roar Gronmo

    12/03/2019, 1:12 PM
    Have anyone successfully combined Room and Compose. I am getting this compiler error when I turn on "`buildFeatures { compose true }`" and have kapt annotationProcessor on (
    kapt 'androidx.room:room-compiler:2.2.2'
    ):
    e: java.lang.NoSuchMethodError: org.jetbrains.kotlin.codegen.state.GenerationState$Builder.isIrBackend(Z)Lorg/jetbrains/kotlin/codegen/state/GenerationState$Builder;
    	at org.jetbrains.kotlin.kapt3.AbstractKapt3Extension.contextForStubGeneration(Kapt3Extension.kt:267)
    	at org.jetbrains.kotlin.kapt3.AbstractKapt3Extension.analysisCompleted(Kapt3Extension.kt:164)
    	at org.jetbrains.kotlin.kapt3.ClasspathBasedKapt3Extension.analysisCompleted(Kapt3Extension.kt:98)
    	at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM$analyzeFilesWithJavaIntegration$2.invoke(TopDownAnalyzerFacadeForJVM.kt:97)
    	at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration(TopDownAnalyzerFacadeForJVM.kt:107)
    	at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration$default(TopDownAnalyzerFacadeForJVM.kt:82)
    	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler$analyze$1.invoke(KotlinToJVMBytecodeCompiler.kt:558)
    	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler$analyze$1.invoke(KotlinToJVMBytecodeCompiler.kt:85)
    	at org.jetbrains.kotlin.cli.common.messages.AnalyzerWithCompilerReport.analyzeAndReport(AnalyzerWithCompilerReport.kt:107)
    	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.analyze(KotlinToJVMBytecodeCompiler.kt:549)
    	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules$cli(KotlinToJVMBytecodeCompiler.kt:180)
    	at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:172)
    	at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:56)
    	at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:85)
    	at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:43)
    	at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:104)
    	at org.jetbrains.kotlin.incremental.IncrementalJvmCompilerRunner.runCompiler(IncrementalJvmCompilerRunner.kt:349)
    	at org.jetbrains.kotlin.incremental.IncrementalJvmCompilerRunner.runCompiler(IncrementalJvmCompilerRunner.kt:105)
    	at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileIncrementally(IncrementalCompilerRunner.kt:237)
    	at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.access$compileIncrementally(IncrementalCompilerRunner.kt:37)
    	at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner$compile$2.invoke(IncrementalCompilerRunner.kt:79)
    	at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compile(IncrementalCompilerRunner.kt:91)
    	at org.jetbrains.kotlin.daemon.CompileServiceImplBase.execIncrementalCompiler(CompileServiceImpl.kt:606)
    	at org.jetbrains.kotlin.daemon.CompileServiceImplBase.access$execIncrementalCompiler(CompileServiceImpl.kt:99)
    	at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:1645)
    	at sun.reflect.GeneratedMethodAccessor101.invoke(Unknown Source)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:498)
    	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357)
    	at sun.rmi.transport.Transport$1.run(Transport.java:200)
    	at sun.rmi.transport.Transport$1.run(Transport.java:197)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
    	at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:573)
    	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:834)
    	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:688)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:687)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    	at java.lang.Thread.run(Thread.java:748)
    FAILURE: Build failed with an exception.
    * What went wrong:
    Execution failed for task ':app:kaptGenerateStubsDebugKotlin'.
    > Internal compiler error. See log for more details
    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
    * Get more help at <https://help.gradle.org>
    BUILD FAILED in 2s
    Here's the issuetracker node for this one: https://issuetracker.google.com/145557605 RG
    z
    p
    • 3
    • 8
  • j

    Jan Lund

    12/03/2019, 1:51 PM
    How will navigation work in Jetpack compose (since Navigation Components currently seems to be based on Fragments)?
    a
    a
    +3
    • 6
    • 11
  • n

    nglauber

    12/04/2019, 11:34 PM
    I’m playing with custom components in Compose… Is there a way to capture the on touch (and get the X/Y position)? 🤔
    s
    z
    f
    • 4
    • 25
  • i

    itnoles

    12/05/2019, 1:59 AM
    is it just me that The Jetpack Compose IDE plugin is Incompatible of Android Studio 4.0 Canary 5?
    y
    b
    +3
    • 6
    • 17
  • r

    Roar Gronmo

    12/06/2019, 10:02 AM
    Checking out
    dev03
    changes and I am little bit wondered why the quite good structuring in
    dev02
    has been "abandoned" with "parameters" (here: modifiers):
    //dev02
    @Composable
    private fun BottomBarAction(
        @DrawableRes id: Int,
        onClick: () -> Unit
    ) {
        Ripple(
            bounded = false,
            radius = 24.dp
        ) {
            Clickable(onClick = onClick) {
                Padding(12.dp) {
                    Container(width = 24.dp, height = 24.dp) {
                        DrawVector(+vectorResource(id))
                    }
                }
            }
        }
    }
    //dev03
    @Composable
    
    private fun BottomBarAction(
        @DrawableRes id: Int,
        onClick: () -> Unit
    ){
        Ripple(
            bounded = false,
            radius = 24.dp
        ){
            Clickable(onClick = onClick) {
                Container(modifier = Spacing(12.dp) wraps Size(24.dp, 24.dp)) {
                    DrawVector(vectorImage = +vectorResource(id))
                }
            }
        }
    }
    Before I felt i had control over the layout structure, but now
    Padding
    has become a
    Spacing
    modifier
    whics
    wraps
    a
    Size
    .. ? I somehow lost the control here. Or is there fear that the structuring will become too deep in complex layouts, and therefore it is parameterized, or is the situation simply that there are several parallel layers of structuring -> causing the parameterization. RG
    👍 1
    d
    r
    • 3
    • 8
  • r

    Roar Gronmo

    12/06/2019, 10:37 AM
    I suddenly got Classless programming with Kotlin+Compose... ...thats really spooky 👻
    🎉 1
    • 1
    • 1
  • r

    Roar Gronmo

    12/06/2019, 11:25 AM
    Compose, multiple parameters which could be lambdas: My suggestion is to have a
    @Lambda
    annotation in front of the function which should intendly be the lambda function. i.e.:
    private fun BottomBar(
        post: Post, 
        @Lambda onUnimplementedAction: () -> Unit){
    ...
    }
    If it isn't already suggested before. RG
    b
    a
    l
    • 4
    • 33
  • a

    Andrew Kelly

    12/06/2019, 12:27 PM
    @Clara Bayarri I saw your talk at KotlinConf on Compose, and specifically about the Single Child Composable Problem you mentioned. Is it not possible for something like a Button to query the number of children in the lamba and throw a warning if its more than 1? That’d force me as a developer to then include a Row or Column to wrap multiple children, the Row/Column children lambdas would be unbounded in the number they could include.
    m
    l
    a
    • 4
    • 8
  • n

    nglauber

    12/06/2019, 1:00 PM
    Where can I find the API changes from dev02 to dev03? I have a presentation tomorrow and I’d like to update the content…
    r
    l
    +4
    • 7
    • 25
  • r

    Roar Gronmo

    12/06/2019, 1:43 PM
    I got this one today, when "converting" from dev02 to dev03:
    Overload resolution ambiguity. All these functions match.
    public fun Size(width: Dp, height: Dp): LayoutModifier defined in androidx.ui.layout
    public inline fun Size(width: Dp, height: Dp): Size defined in androidx.ui.core
    is this actually the same function ?
    a
    • 2
    • 3
  • k

    kenkyee

    12/07/2019, 2:21 PM
    If the preview window breaks (doesn't display anything), what do we file tickets against? Using AS 4.0 Canary 5 w/ the 4.0.0-alpha05 AGP plugin. Not sure if this is an AGP problem or AS problem. Rebuild of app didn't help... nvm: found it: <https😕/issuetracker.google.com/issues?q=componentid:612128>
    r
    • 2
    • 1
  • r

    Roar Gronmo

    12/07/2019, 3:46 PM
    VerticalScroller onScrollPositionChanged which was available in dev02 has disappeared in dev03. Do any have any clues how to read the VerticalScrollers postion now, or do we use another method to register scrollingchanges ?
    a
    • 2
    • 7
  • k

    kenkyee

    12/08/2019, 3:52 AM
    Where does Compose get Button theme styling from? I created a new project and then changed the colorPrimary, etc. colors in my colors.xml so the non-Compose parts of the app changed colors, but the Compose part didn't. This was a unexpected :-)
    g
    g
    l
    • 4
    • 9
  • r

    Roar Gronmo

    12/08/2019, 12:48 PM
    When will it be possible to combine @Composable and Room ? I think its crucial that those two features can coexist. RG
    a
    a
    a
    • 4
    • 13
  • a

    Adriano Celentano

    12/08/2019, 1:50 PM
    I wanted to checkout how to draw to the canvas, but i wasnt sure where to keep my instances of Paint, which i want to reuse and not recreate on each onDraw(). I saw in the framework code this memo() function, which seems to serve this purpose. Unfortunately i didnt get it. Someone already understood how its working ?
    ```with(+memo { DrawShapeCacheHolder() }) {
        lastShape = shape
        Draw { canvas, parentSize ->
    ...
    }
    m
    l
    a
    • 4
    • 3
  • e

    efemoney

    12/09/2019, 11:34 AM
    Is it too early to start talking about a compose style guide? Or should I check back in 6 months? :troll:
    s
    a
    • 3
    • 5
  • r

    Roar Gronmo

    12/09/2019, 2:37 PM
    Simple, but still problematic. Before we had
    crossAxisAlignment
    (and
    mainAxisAlignment
    ) which we could sett to
    CrossAxisAlignement.End
    ( or
    MainAxisAlignment.End
    ) I want to align thos two texts below to the right, how is that done in dev03 ?
    Column(modifier = Spacing(right = 4.dp) )
    {
        Surface(color = Color.Blue) {
            Text(text = "2019.12.09 12:00")
        }
        Surface(color = Color.Red) {
            
            Text(text = "14d 16h 00min")
        }
    }
    m
    l
    • 3
    • 5
  • i

    Isaac Udy

    12/09/2019, 11:44 PM
    I am having issues running Flows along side Jetpack Compose. If I "collectEach", the compiler will throw an IR exception. I know there was an incompatibility between coroutines and compose at one point in the past, but is this still the case?
    r
    i
    +2
    • 5
    • 5
  • j

    James Richardson

    12/10/2019, 11:40 AM
    hi - i'm trying to use LiveData and Compose with a pretty simple use case. However, I am getting the following stack trace, as soon as my @Composable calls a method that takes a parameter... It's a bit confusing. I don't know what's going on under the hood, so can't really add much more detail... This works
    Column {
                            devices.map {
                                Text(text = it.name)
                            }
                        }
    This fails:
    Column {
                            devices.map(::device)
                        }
    [...]
    @Composable
    private fun device(device: UpnpDevice) {
        Text(text = device.name)
    }
    the stacktrace is:
    2-10 11:39:52.827 3603-3603/? D/Error: ERR: stack=java.lang.IllegalStateException: Expected a group start
            at androidx.compose.SlotTableKt.getAsGroupStart(SlotTable.kt:641)
            at androidx.compose.SlotTableKt.access$getAsGroupStart$p(SlotTable.kt:1)
            at androidx.compose.SlotEditor.recordStartGroup$compose_runtime_release(SlotTable.kt:150)
            at androidx.compose.SlotReader.startGroup(SlotTable.kt:277)
            at androidx.compose.SlotReader.startGroup(SlotTable.kt:273)
            at androidx.compose.ComposerKt.start(Composer.kt:1791)
            at androidx.compose.ComposerKt.access$start(Composer.kt:1)
            at androidx.compose.Composer.start(Composer.kt:776)
            at androidx.compose.Composer.startGroup(Composer.kt:397)
            at androidx.compose.ObserveKt.Observe(Observe.kt:37)
            at com.example.filecopier.FileCopierAppKt.device(FileCopierApp.kt)
            at com.example.filecopier.FileCopierAppKt.access$device$0(FileCopierApp.kt)
            at com.example.filecopier.FileCopierAppKt$fileCopierApp$1$2$invoke$1$2$invoke$1$1$invoke$1.invoke(FileCopierApp.kt:32)
            at com.example.filecopier.FileCopierAppKt$fileCopierApp$1$2$invoke$1$2$invoke$1$1$invoke$1.invoke(FileCopierApp.kt)
            at androidx.compose.ObserveKt.Observe(Observe.kt:39)
            at com.example.filecopier.FileCopierAppKt$fileCopierApp$1$2$invoke$1$2$invoke$1$1.invoke(FileCopierApp.kt)
            at com.example.filecopier.FileCopierAppKt$fileCopierApp$1$2$invoke$1$2$invoke$1$1.invoke(FileCopierApp.kt)
            at androidx.ui.layout.FlexKt$Column$1$1$invoke$1.invoke(Flex.kt:362)
            at androidx.ui.layout.FlexKt$Column$1$1$invoke$1.invoke(Flex.kt)
            at androidx.compose.ObserveKt.Observe(Observe.kt:39)
            at androidx.ui.layout.FlexKt$Column$1$1.invoke(Flex.kt)
            at androidx.ui.layout.FlexKt$Column$1$1.invoke(Flex.kt)
    I'm using the
    +observe
    snippet previously posted... any ideas much appreciated! I should mention that the code works fine in the preview, so I'm guessing its something to do with the
    observe
    a
    c
    • 3
    • 10
  • m

    Mark Haehnel

    12/10/2019, 1:08 PM
    Has anybody else seen problems with missing and broken colors when you use Theme Colors like secondary or error on devices with API level 28 or lower? Here is an example:
    MaterialTheme() {
      Card(color = +themeColor { secondary }) {
        Text("Test")
      }
    }
    On API 29 it looks like it should (First attached image 'API_29.png') On API 28 the colors don't get applied and thus the foregound text color is broken too. (Second image 'API_28.png') A little note to the images: Look at the top "tab" bar. The white cards with black text are OK, the ones where the green background is missing are broken.
    l
    • 2
    • 16
  • g

    Geert

    12/10/2019, 11:00 PM
    I don’t know whats wrong with my project, but since I changed from dev2 to dev3, my
    setContent
    en
    Text
    functions wont work/import. I tried to import gradle as using api/implementation, am I missing something? Dependencies:
    implementation 'androidx.ui:ui-layout:0.1.0-dev03'
    implementation 'androidx.ui:ui-material:0.1.0-dev03'
    implementation 'androidx.ui:ui-tooling:0.1.0-dev03'
    l
    s
    +3
    • 6
    • 9
  • r

    Roar Gronmo

    12/11/2019, 9:16 PM
    Any release date for dev04 ?
    a
    • 2
    • 4
  • f

    Fudge

    12/11/2019, 10:56 PM
    It looks like between dev-03 and now
    compose-runtime
    has lost the dependency on
    android.*
    😮
    l
    • 2
    • 3
Powered by Linen
Title
f

Fudge

12/11/2019, 10:56 PM
It looks like between dev-03 and now
compose-runtime
has lost the dependency on
android.*
😮
ui-text
is so close to not using
android.*
, there's just one tiny
Log.w
call 😆
😂 1
l

Louis Pullen-Freilich [G]

12/11/2019, 11:13 PM
What do you mean?
compose-runtime
still has a lot of android dependencies 🙂 It's just a multiplatform module, so we split out the common / android specific implementations, to enable host-side testing in the future.
f

Fudge

12/11/2019, 11:18 PM
hmm, I must have missed them then
View count: 3