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-wear
  • a

    Ash

    12/16/2021, 1:02 AM
    Mac died after almost 20 years. Got a new Apple MBP M1Pro. Super happy with the SwiftUI iWatch dev but can not find a WearOS image? Super confused ... how are people testing WearOS on M1? We can use https://developer.samsung.com/remote-test-lab or buy a device but it would be nice to run the emulator ... no? HELP 🙏🏽
    👀 1
    c
    j
    s
    • 4
    • 5
  • j

    John Nichol

    12/16/2021, 8:07 PM
    Compose for Wear OS Alpha13 shipped yesterday. Includes some improvements to navigation and also fixes to allow building of release configs which will allow folks to test their applications minified and with resources shrunk to get a better view on performance.
    :kotlin-intensifies-purple: 1
    🙌 4
    :kotlin-intensifies: 2
    🙌🏽 1
    a
    a
    • 3
    • 2
  • s

    SrSouza

    12/17/2021, 12:55 AM
    There is any way to create watchfaces with Compose?
    j
    y
    d
    • 4
    • 7
  • j

    John O'Reilly

    12/17/2021, 7:35 PM
    Looks like Jetpack Compose
    1.1.0-rc02
    (well, Compose Compiler part anyway) works with Kotlin 1.6.10....should there be wear compose version right now that also works with that? https://kotlinlang.slack.com/archives/CJLTWPH7S/p1639683988274300
    🎉 2
    • 1
    • 1
  • a

    Ash

    12/18/2021, 10:52 PM
    If we say we are doing Declarative Programming ... shouldn't the code be the same for both round and square but the Composable does the correct layout for the device? So we should not need this
    if
    statement. These should both just be Row and each WearOS device doing the correct rendering ...
    if (LocalConfiguration.current.isScreenRound) {
        CurvedRow(
     } else {
        Row(
    This does not feel like Declarative to me ??? 🤷🏽
    y
    c
    s
    • 4
    • 9
  • y

    yschimke

    12/20/2021, 10:43 AM
    What is the expectation for slots in components like ToggleChip? I didn't notice appIcon, so I put the icon inside the label to start with. Because label is placed inside of a Column, with secondaryColumn, I surrounded it with a row. But it seems like the Column parent is leaking an implementation detail? How do Compose mobile components handle this? Should it be a parent Box? Should it fail if the label @Composable has more than one direct child?
    j
    a
    • 3
    • 10
  • s

    Steve Bower [G]

    12/20/2021, 4:11 PM
    Can you use let for this? See https://discuss.kotlinlang.org/t/let-vs-if-not-null/3542 mediaItem.mediaMetadata.artworkUri?.let { it -> ... }
    y
    • 2
    • 4
  • a

    Ash

    12/21/2021, 3:43 AM
    Need a little help ... Android Architectural Components works on WearOS? Trying to use Hilt, ViewModel, Repo, Room DAO with Koltin Flow and Compose (w/ Navigation). This should all work? Right?
    j
    y
    • 3
    • 3
  • l

    Lebron James

    12/21/2021, 5:59 AM
    Who has customized wheel picker to use compose? thank you!
    j
    t
    +2
    • 5
    • 15
  • u

    이준학

    12/27/2021, 4:40 AM
    Hi, I found two errors while developing WearOS with jetpack compose. 1. Textfield - I think it will be fixed soon. 2. Screen is locked with ViewPager2 - I report it in issueTracker... • https://issuetracker.google.com/issues/209359388 I wonder when the bugs will be fixed. And can i ask this question here?
    j
    y
    • 3
    • 3
  • y

    Yingding Wang

    12/30/2021, 12:01 PM
    App with wear os compose 1.0.0 alpha13 deployed on wear emulator crashes wenn I open the Layout Inspector in AS. Is it a known issue? With Layout Inspector closed, the App is just fine. Is any workaround to use Layout Inspector with wear os compose?
    j
    • 2
    • 5
  • y

    Yingding Wang

    12/30/2021, 9:43 PM
    I want to make the time text in scaffold disappear, when the ScalingLazyColumn scrolled up. Is there a better approach as check the first element in
    layoutInfo.visibleItemsInfo
    and its
    offset
    ?
    ...
            val listState = rememberScalingLazyListState()        
            Scaffold(
                timeText = {
                    val itemInfoList = listState.layoutInfo.visibleItemsInfo
                    // the first element is scrolled up more than 15dp, deactivate the Time Text
                    if (itemInfoList.isNotEmpty()
                        && itemInfoList[0].index == 0 // the first visible index is the first element
                        && itemInfoList[0].offset >= -15 // the first element is scrolled up less than 15dp
                    ) {
                        // show time text
                        TimeText()
                    }
                },
    c
    y
    j
    • 4
    • 4
  • y

    yschimke

    01/04/2022, 12:20 PM
    The StarWars sample form @John O'Reilly is a nice KMM and GraphQL (apollo) example, including for Wear. https://github.com/joreilly/StarWars
    👍🏽 1
    ❤️ 2
    👍 2
    m
    • 2
    • 4
  • t

    Thomas

    01/06/2022, 5:43 PM
    I am running into an issue where my compose wear app crashes with a NullPointerException when navigating between screens using the wear compose navigation library. Found an already reported issue here: https://issuetracker.google.com/issues/206677462. Could someone please look into this? This is currently blocking me from using compose on Wear OS.
    y
    j
    s
    • 4
    • 13
  • a

    Austin Nelson

    01/08/2022, 12:06 AM
    About to release my first Jetpack Compose/ WearOS3 app! This was my first introduction into Jetpack Compose and WearOS3 (there's a Tile that goes with the app). I've made apps and watch faces back when I still had the original moto 360, and it's awesome how far the wear ecosystem has come (still has a long way to go, but on the right track!) This is a complete standalone app for interacting with the Philips Hue ecosystem. Open to any thoughts on design, features, etc. Also if anyone has Philips Hue and is interested in beta testing, let me know!
    PXL_20220105_232503108.mp4
    🎉 9
    💡 4
    :nice: 2
    j
    y
    • 3
    • 16
  • y

    yschimke

    01/12/2022, 12:06 PM
    For CurvedText, if drawing at the bottom, is there a way to flip it so it's not upside down?
    j
    s
    s
    • 4
    • 11
  • y

    yschimke

    01/12/2022, 7:31 PM
    Bumping up
    j
    • 2
    • 4
  • j

    John Nichol

    01/12/2022, 10:01 PM
    Compose for Wear OS Alpha 14 is now available - release notes here. Includes major changes to ScalingLazyColumn to support a) anchoring list items to the centre of the view port, b) changing the list item offsets to be w.r.t. that viewport center, and c) adding methods to scrollTo and animatedScrollTo items in the list. Scrolling to list items will bring them to the center of the view port.
    👍 6
    :party-parrot: 6
    • 1
    • 1
  • y

    Yingding Wang

    01/13/2022, 7:45 PM
    In Compose for Wear OS Alpha 14 now, the
    offset
    of
    ScalingLazyListItemInfo
    are either related aligned to the centre of the viewport or to the top edge either from center or edge of a list item with anchorType
    ScalingLazyListAnchorType.ItemCenter
    or
    ItemStart
    while initialising the ScalingLazyColumn, the option of offset to its initial position of Alpha 13 are now gone. How can I detect that the ScalingLazyColumn has been scrolled up e.g. 15dp?
    j
    y
    • 3
    • 13
  • d

    Dmitry Kroz

    01/17/2022, 10:49 PM
    Hello! Is there equivalent for CircularProgressLayout available in Compose for Wear OS? Thank you!
    b
    j
    c
    • 4
    • 4
  • y

    yschimke

    01/19/2022, 5:58 PM
    I don't actually know who deserves credit, but the Wear Specific previews in Android Studio Canary are pretty great. PR for sample project https://github.com/android/wear-os-samples/pull/206
    • 1
    • 2
  • l

    Lebron James

    01/21/2022, 3:21 AM
    Who has done similar work on paging navigation? I can't find the code on the document. thank you!
    y
    y
    +2
    • 5
    • 10
  • b

    Bernt Julian

    01/21/2022, 9:21 AM
    When implementing a standalone application, is there any way to authenticate the user while using Compose?
    j
    y
    • 3
    • 7
  • y

    yschimke

    01/24/2022, 11:57 AM
    Related to the paging navigation discussion above, one glitch I've noticed is that it seems easy to accidentally swipe to dismiss the main screen with paging instead of switching left. Is it easy to disable that? I know I'm using SwipeDismissableNavHost, but that seems to have a lot of logic I suspect I otherwise need. cc @Steve Bower [G]
    s
    • 2
    • 4
  • s

    Steve Bower [G]

    01/25/2022, 10:30 AM
    Hi - could you paste some compose code to illustrate the problem? It sounds like there must be something like Modifier.padding(<some non-zero value>) in your composition, because otherwise compose does draw up to the edge.
    l
    y
    • 3
    • 3
  • l

    Lebron James

    01/26/2022, 10:55 AM
    I want to re execute some code for view rendering in the composable method. How do I implement it? Do you have a general idea. thank you!
    b
    • 2
    • 3
  • j

    John Nichol

    01/26/2022, 8:22 PM
    Compose for Wear OS Alpha15 has been released. A few additions and changes - one in particular to draw your attention to is that we have added what we call `autoCentering`which will automatically provide space before the first and after the last items in your
    ScalingLazyColumn
    removing the need to provide top/bottom/vertical content padding - so look to update your padding as part of upgrading.
    🙌🏽 1
    :party-parrot: 1
    🚀 3
    👍🏽 1
    🙌 2
    👍 3
    ❤️ 11
    👍🏼 1
    d
    s
    y
    • 4
    • 14
  • a

    Austin Nelson

    01/27/2022, 2:28 PM
    https://android-developers.googleblog.com/2022/01/announcing-glance-tiles-for-wear-os.html?m=1 Is this relevant for this channel?!
    j
    j
    • 3
    • 8
  • t

    Thomas

    01/29/2022, 1:27 AM
    Hey, I have started rolling out a new version of my Wear app using Compose Wear to some beta testers. Some users are getting the following crash:
    Fatal Exception: java.lang.IllegalArgumentException: No WearNavigation.Destination has been added to the WearNavigator in this NavGraph. For convenience, build NavGraph using androidx.wear.compose.navigation.composable.
           at androidx.wear.compose.navigation.SwipeDismissableNavHostKt.SwipeDismissableNavHost(SwipeDismissableNavHostKt.java:166)
           at androidx.wear.compose.navigation.SwipeDismissableNavHostKt.SwipeDismissableNavHost(SwipeDismissableNavHostKt.java:87)
           ... (redacted)
    Note that it works great for most users, so far this crash is only affecting a few users. I am not able to reproduce it myself. I am creating my nav host like this:
    SwipeDismissableNavHost(
        navController = navController,
        startDestination = "mydestname"
    ) {
        // Note that composable is from androidx.wear.compose.navigation package.
        composable("mydestname") {
            ...
        }
        ... more composables
    }
    The crash seems unexpected to me as there are always destinations added, so I suspect this is a bug. This is using androidx.wear.compose:* snapshot 8104636 and androidx.navigation:* 2.4.0-rc01. Any suggestions?
    j
    s
    l
    • 4
    • 25
  • j

    John O'Reilly

    01/29/2022, 11:58 AM
    Should it be possible to run a Wear OS emulator (that has minSdk >= 26) on an M1 device?
    t
    j
    • 3
    • 3
Powered by Linen
Title
j

John O'Reilly

01/29/2022, 11:58 AM
Should it be possible to run a Wear OS emulator (that has minSdk >= 26) on an M1 device?
t

Thomas

01/29/2022, 12:59 PM
Not until https://issuetracker.google.com/issues/208843522 is fixed
👍 1
It would be a great feature, I miss it so much.
j

John Nichol

01/29/2022, 1:23 PM
It is actively being worked on, we hope to have an M1 Wear 3.0 Emulator soon, but I don't have specific dates for you yet.
🙏 1
🙏🏽 1
🎉 4
View count: 3