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

    codeslubber

    11/16/2019, 5:59 AM
    Why no gestures yet in Compose? should we manage gestures at the Activity level and just update the ViewModel?
    l
    a
    f
    • 4
    • 9
  • j

    Johan

    11/16/2019, 11:54 AM
    I have just started using Compose. Now I would like to have a Camera(X) widget in a @Composable. Can not seem to find that component. How can I go about wrapping it up myself?
    a
    • 2
    • 3
  • b

    Bruno_

    11/17/2019, 1:45 PM
    is there an easy way to display a gif/loading indicator/rotate a composable?
    • 1
    • 3
  • c

    Can

    11/17/2019, 2:20 PM
    Using an `@Model` class as a parameter for a compose function does not seem to work right now? :thinking_face:
    l
    l
    • 3
    • 22
  • a

    Alexander Repin

    11/18/2019, 10:26 AM
    Is there're a way to make it working?
    a
    l
    • 3
    • 8
  • c

    camkadev

    11/18/2019, 10:43 AM
    is there a way to provide
    Android Context
    in
    Preview
    ? It is needed to take some resources like Vector drawables
    l
    • 2
    • 2
  • l

    Luca Nicoletti

    11/18/2019, 11:11 AM
    Feedback:
    color = (+MaterialTheme.colors()).primary
    is way uglier than what it used to be:
    color = +themeColor { primary }
    ➕ 2
    m
    s
    +4
    • 7
    • 95
  • a

    Alexander Repin

    11/18/2019, 11:33 AM
    is here something like RecyclerView?
    🇳🇴 5
    r
    • 2
    • 1
  • a

    Alexander Repin

    11/18/2019, 11:33 AM
    so it's impossible to create a scrollable view?
    k
    • 2
    • 3
  • k

    kioba

    11/18/2019, 11:51 AM
    Just a quick reminder. There is a small FAQ about compose here: https://github.com/Mishkun/jetpack-compose-faq @themishkun Created just for the community, if you want something to be added just open an issue or a pr!
    👍 1
    l
    • 2
    • 1
  • a

    amar_1995

    11/18/2019, 12:59 PM
    I want to show a box appeared from bottom after onclick. Tried using
    BottomDrawerLayout
    and
    DropdownPopup
    . Is there something else to which I can try to achieve this ?
    e
    b
    m
    • 4
    • 18
  • m

    Muh Rahmatullah

    11/18/2019, 4:26 PM
    hi all, is there any straightforward way to show image with custom width and height? currently I am using
    SimpleImage
    wrapped inside a
    Container
    . code like this
    Container(width = 62.dp, height = 42.dp) {
                    SimpleImage(image = image)
                }
    b
    a
    • 3
    • 4
  • b

    Bruno_

    11/18/2019, 10:03 PM
    if I change a value of some prop inside
    @Model
    object, will it trigger rerender of a whole "tree"? I mean not only the composable that uses this object, right?
    j
    m
    +3
    • 6
    • 18
  • l

    Luca Nicoletti

    11/19/2019, 3:36 PM
    Is it possible that
    imageFromResource
    does not work in
    repo
    ?
    a
    r
    • 3
    • 30
  • i

    itnoles

    11/19/2019, 11:35 PM
    is it okay to use a new Kotlin Plugin 1.3.60 without eap?
    s
    l
    d
    • 4
    • 15
  • f

    Facundo Rodriguez Arceri

    11/20/2019, 1:25 PM
    Hi, I'm having issues using TextField. I can't use the cursor in order to move around the text and try to delete or edit it. I'm trying to do a simple calculator and this is what happens to me
    textfield-nosound.mp4
    b
    l
    +2
    • 5
    • 19
  • g

    galex

    11/21/2019, 10:14 AM
    Hello, what will be the equivalent of selectors in Compose? Will we be able to set a few attributes at once (like a style) instead of a selector per xml property?
    k
    • 2
    • 2
  • a

    amar_1995

    11/21/2019, 11:37 AM
    We cannot able to use
    try-catch
    inside composable function. I am getting the below error
    Try catch is not supported around composable function invocations.
    😄 2
    k
    m
    +2
    • 5
    • 14
  • m

    matt tighe

    11/21/2019, 6:20 PM
    Can there only be one
    @Preview
    function and does it need to be in the main activity?
    z
    l
    l
    • 4
    • 7
  • a

    amar_1995

    11/22/2019, 8:04 AM
    Please explain me the difference between
    +memo
    ,
    +state
    ,
    +model
    and when to use which one ? I know all of this observing some value and try to recompose on value changes.
    y
    • 2
    • 12
  • m

    MBegemot

    11/22/2019, 10:40 AM
    Hi, how can I add or remove components of my user interface at run time? tanks
    y
    • 2
    • 2
  • m

    MBegemot

    11/22/2019, 10:51 AM
    Well, I mean as an example suppose you have a button and every time you press it you add a text or any other component to a certain container...
    y
    • 2
    • 1
  • m

    MBegemot

    11/22/2019, 11:06 AM
    So there is no generic addview like concept in compose, but I think I got the idea many thanks (A list of parameters in a model, and a component which draws that list)
    y
    l
    • 3
    • 3
  • l

    Luca Nicoletti

    11/22/2019, 4:07 PM
    What’s the corresponding of:
    setShadowLayer
    in
    androidx.ui.graphics.Paint
    ? Is there a way to draw shadow inside
    Draw {}
    composable?
    y
    l
    • 3
    • 5
  • l

    Luca Nicoletti

    11/22/2019, 5:33 PM
    I’m trying to draw a circle when the user tap on the screen. I have a
    var inputPosition: Offset? by +state { null as Offset? }
    I updated it inside the
    PressGestureDetector
    observer with:
    inputPosition = Offset(position.x.value, position.y.value)
    then I have a
    @Composable
    function that accept an
    Offset?
    as input and
    Draw { canvas, _ -> canvas.drawCircle(pos, size.value, paint = paint) }
    with that position. I’m getting the following error as soon as the user tap somewhere:
    Untitled
    y
    l
    • 3
    • 9
  • r

    Roar Gronmo

    11/23/2019, 3:45 PM
    Have anyone a working example with compose and Room viewing a list in a VerticalScroller setting (or any other composable) which is imitating a recyclerview? Very interesting in how to detect where/when/how to add items the best way to the VerticalScroller when scrolling, and how to update data contents to the existing items in the list the best way ?
    b
    l
    m
    • 4
    • 16
  • d

    deactivateduser

    11/24/2019, 1:54 PM
    Hey, I see that Semantic public API documentation is still in the works (https://issuetracker.google.com/issues/138173117)? I am wondering how to set accessibility label onto a view (or if I got the terminology right - a node on the semantic tree?)
    r
    • 2
    • 6
  • c

    camkadev

    11/25/2019, 6:38 AM
    How do you folks draw Rectangle stroke border without fill? it looks like when i try to draw 3 rectangle borders one of them hide somehow
    y
    a
    • 3
    • 8
  • l

    len

    11/26/2019, 11:17 AM
    Trying to build any of the compose demos in the repo fails with a compiler error:
    Caused by: java.lang.AssertionError: lastLineNumber shall be not negative, but is -1
    	at org.jetbrains.kotlin.backend.jvm.codegen.IrSourceCompilerForInline.doCreateMethodNodeFromSource(IrSourceCompilerForInline.kt:98)
    	at org.jetbrains.kotlin.codegen.inline.InlineCodegen$Companion.createInlineMethodNode$backend(InlineCodegen.kt:538)
    	at org.jetbrains.kotlin.codegen.inline.InlineCodegen.performInline(InlineCodegen.kt:139)
    	...
    Not sure they currently don't compile and you're aware of this or my setup is wrong (I only followed the steps to clone the repo and ran
    repo sync
    ). I also tried applying the kotlinc 1.3.61 patch but nothing changed. The command I ran was
    ./gradlew :ui:ui-material:integration-tests:ui-material-demos:installDebug
    l
    • 2
    • 7
  • d

    Daniel Sandström

    11/26/2019, 9:29 PM
    Hello! Is it possible to draw border only to 3(top right left) sides of a square?
    z
    • 2
    • 2
Powered by Linen
Title
d

Daniel Sandström

11/26/2019, 9:29 PM
Hello! Is it possible to draw border only to 3(top right left) sides of a square?
z

Zach Klippenstein (he/him) [MOD]

11/26/2019, 9:35 PM
I don’t think this is supported by anything built-in, but it should be simple to implement this using
Draw
yourself
d

Daniel Sandström

11/26/2019, 9:37 PM
Ok thanks 🙂 Just wanted to know if i had missed something 😄
View count: 6