https://kotlinlang.org logo
Join SlackCommunities
Powered by
# compose-wear
  • l

    lam bui

    07/22/2024, 2:14 AM
    compose wear: how to create ripple effect like:
    z
    s
    • 3
    • 5
  • t

    Tolriq

    07/26/2024, 8:52 AM
    In holidays tonight but just update to a recent Compose snapshot and everything wear related and facing a very very strange bug on Wear. This is roughly based on Horologist but when opening the volume dialog then dimissing it, nothing is clickable or scrollable.
    y
    • 2
    • 4
  • t

    Tolriq

    07/26/2024, 8:53 AM
    Layout inspector show that the content is actually completely offscreen but yet somehow a layer is still showing something on screen.
  • l

    lam bui

    07/30/2024, 7:32 AM
    Hi everyone. I meet issue. how to detect when the user is not wearing their WearOS device?
    l
    a
    a
    • 4
    • 22
  • l

    lam bui

    08/06/2024, 4:43 AM
    Hi everyone: I have a confuse:
    Copy code
    Is there a way on Android to build a phone app attach build wear like Apple?
    I'm looking for a way to automatically build for testing. Without going through android studio.
    m
    l
    • 3
    • 5
  • l

    lam bui

    08/14/2024, 9:17 AM
    Hi, Sorry to bother you, Iโ€™m having a review issue with google that seems like they canโ€™t open the wear apk. Even though Iโ€™ve built the aab include to the store. Actually unrelated to compose-wear, but working with wear issue on review I have no experience and have searched for solution but have not found.
    c
    • 2
    • 9
  • m

    marlonlom

    08/19/2024, 10:01 PM
    Hi everyone, Do you know if there is a new scaffold using material3 on wearos? if so, can you show an example of using the scaffold? Note: i did know that i could not mix the
    wear-compose-material3
    with
    wear-compose-material
    libraries... so, when building an app, the scaffold that exists in the wear-foundation library is not showing the composables that belongs to
    wear-compose-material3
    library.
    y
    • 2
    • 3
  • z

    Zach Klippenstein (he/him) [MOD]

    09/09/2024, 4:06 PM
    Congrats! FYI#C01Q62JMKBP is also a great place to post stuff like this
    l
    m
    • 3
    • 4
  • y

    yschimke

    09/13/2024, 9:55 AM
    The setExactAndAllowWhileIdle seems like it's waiting for the alarm to fire.
    f
    • 2
    • 18
  • s

    Shashi K

    09/17/2024, 3:53 AM
    Help! We have ~15k records to transfer to watch(companion app), we are using data channel to transfer, however it is working as expected if the data is small chunk but not for the large data. What is the best way to transfer the data in this scenario. Building our own pagination ?
    l
    y
    • 3
    • 5
  • l

    louiscad

    09/26/2024, 11:16 PM
    Hello, is there an equivalent to LazyColumn's
    animateItem()
    for ScalingLazyColumn in Horologist, or in Wear Compose Foundation? I need to animate item additions, removals, and order changes.
    โœ… 1
    y
    • 2
    • 20
  • s

    stevebower

    10/03/2024, 11:28 AM
    Hi all - we have released 1.5.0-alpha03 with updates to SwipeToReveal and LazyColumn. Also, this release adds HorizontalPager and VerticalPager in the Foundation library, with fixes for Pager bugs reported in this forum. We will be following up with a PagerScaffold in the Material3 library that wraps the pagers and page indicators as well as providing animation. There have also been updates to the Material3 library in our 1.0.0-alpha26 release, including a new SwipeToReveal component. Note that in 1.0.0-alpha25 we added support for shape animations on round buttons such as IconButton and IconToggleButton.
    ๐ŸŽ‰ 4
  • t

    Tolriq

    10/04/2024, 10:02 AM
    Any reason why IconButtonColors and the likes have the copy function internal and not similar to standard Compose colors copy with defaults for all fields ?
    s
    • 2
    • 2
  • a

    amoledwatchfaces

    10/20/2024, 12:54 PM
    Quick question. Does androidx.wear.tiles.tiles:1.4.1 support a way to create multiple instances of the same tile? (Clicking on tile from tile chooser adds instance to the tile carousel, similar to watch faces) If so, is there some documentation for this?
    y
    • 2
    • 10
  • t

    Tolriq

    10/31/2024, 9:19 AM
    Last Wear M3 broke the placeholders. No time for a repro this week but if you take the placeholder sample and do not call the
    animatePlaceholder
    then there's no recomposition on isContent ready change. (Also if you remove the
    placeholderShimmer
    so not tied to shimmer.
    ๐Ÿ˜ฆ 1
    s
    • 2
    • 6
  • j

    Jeremiah Jordan

    11/21/2024, 1:36 AM
    I have a question the proper way to test Navigation in compose-wear. When I use the TestNavHostController, and I create a graph with
    createGraph
    and
    composable(Screen.MainMenu.route)
    set I get a casting error:
    Copy code
    java.lang.ClassCastException: androidx.navigation.testing.TestNavigatorProvider$navigator$1 cannot be cast to androidx.wear.compose.navigation.WearNavigator
    at androidx.wear.compose.navigation.NavGraphBuilderKt.composable(NavGraphBuilder.kt:55)
    at androidx.wear.compose.navigation.NavGraphBuilderKt.composable$default(NavGraphBuilder.kt:36)
    If I don't create a graph, I get a null-pointer error, since there's nowhere to navigate to. All the examples I see online seem to be using
    R.navigation
    , but I think that's used when your app uses an XML navigation definition, and not jetpack compose...
    i
    • 2
    • 4
  • j

    Jeremiah Jordan

    11/22/2024, 10:02 PM
    I put the question on StackOverflow so that others can learn the answer https://stackoverflow.com/questions/79216700/how-to-test-navigation-when-using-jetpack-compose-on-wearos
  • f

    florent

    11/27/2024, 7:04 PM
    Hello, are people doing Bluetooth with android wear? I can't connect to a pixel watch 2 even though I am paired with it. It works only with the device that has been paired with using the official google application. Is it a normal behavior ? I would like people to be able to temporally share their device with other people if they want to.
  • l

    Lauri Koskela

    12/15/2024, 11:20 AM
    Not Compose or Kotlin related, but I'll ask anyway since Wear OS devs seem to hang around here: It seems that starting an activity from a complication timeline tap action is broken on Wear OS 5 due to some background activity launch restrictions. Normal non-timeline complications work fine. I filed an issue here with some sample code. Does anyone have suggestions for a workaround? To me it looks like a bug in the watch face framework, which would mean I can't really do anything about it besides waiting for a fix and for all users' devices to be updated ๐Ÿซค
    y
    • 2
    • 1
  • m

    marlonlom

    12/15/2024, 11:07 PM
    ๐Ÿ“– "First steps using Material3 in a WearOS Android App" blog post by me. Enjoy ๐Ÿ™‚ https://dev.to/marlonlom/first-steps-using-material3-in-a-wearos-android-app-1l92
    ๐Ÿ‘๐Ÿผ 1
    y
    • 2
    • 3
  • s

    stevebower

    12/18/2024, 10:59 AM
    Hi all - last week we released 1.5.0-alpha07 with updates to TransformingLazyColumn including handling for animation when adding/removing items and automatic transformations on our material3 Button and Card components. Also, SwipeDismissableNavHost now has updated animations when running on API 35. In the Material3 library, we have released 1.0.0-alpha30 with many updates to motion (such as LinearProgressIndicator and toggle buttons), bug fixing on DatePicker and some API improvements. Please take a look at the release notes for more details.
    ๐Ÿ‘ 1
  • y

    yschimke

    01/28/2025, 11:45 AM
    I wanted to call out a really useful Wear library for creating License activities https://github.com/droibit/oss-licenses-android
    ๐Ÿš€ 4
    ๐Ÿ‘ 2
    ๐Ÿ‘๐Ÿฝ 1
    ๐Ÿ‘๐Ÿผ 1
    f
    m
    • 3
    • 7
  • s

    stevebower

    01/30/2025, 12:17 PM
    Hi all - we have released 1.5.0-alpha09 with updates to simplify the ReduceMotion API and also an extension to CurvedTextStyle to include distinct letter spacings for clockwise and anti-clockwise curved text (needed because whilst clockwise letters fan out from the baseline, anti-clockwise letters fan in, so the latter need a larger spacing). In the Material3 library, we have released 1.0.0-alpha32. This includes: updates to button Shapes classes API to improve consistency; improvements to curved text rendering and associated updates to TimeText which remove earlier non-round support; a revamp of the ButtonGroup API to replace the DSL-based ButtonGroupItem with modifier.weight, modifier.minWidth and modifier.animateWidth; bug fixes to animation on EdgeButton and Button; addressed inconsistencies in large-screen breakpoints (screens at and above 225dp are large screen). Please take a look at the release notes for more details.
    ๐Ÿš€ 2
    ๐ŸŽ‰ 3
    alphabet white a 1
    alphabet white l 1
    alphabet white p 1
    alphabet white h 1
    ๐Ÿ…ฐ๏ธ 1
    โ™พ๏ธ 2
    m
    • 2
    • 3
  • s

    stevebower

    02/17/2025, 5:04 PM
    Please note that we released 1.4.1 last week, with a patch to guard against a crash when accessing the global reduce motion setting, which was triggered on some platform builds where that setting was not provided.
    ๐ŸŽ‰ 3
  • s

    stevebower

    02/27/2025, 5:52 PM
    Hi all - we have released 1.5.0-alpha10 with support for overscroll and prefetching in TransformingLazyColumn and updates to SwipeToReveal and Pager. Also, note that SwipeDismissableNavHost now uses PredictiveBack only in API 36 onwards. In the Material3 library, we have released 1.0.0-alpha33. The ArcLarge, ArcMedium and ArcSmall typographies are intended for use with curved text and are now explicitly CurvedTextStyle. Dialogs now use AppScaffold (when available) to show themselves, instead of launching compose.ui.window.Dialog, which gives a significant reduction in Jank. This release also includes improvements to APIs such as SwipeToReveal, LevelIndicator, button shapes classes, CircularProgressIndicator. We will be upgrading to Kotlin 2.0 for the wear compose libraries in the next release cycle, which will be another alpha release, and will include a small number of new APIs. Subsequently, as soon as all API feedback has been resolved, we look forward to cutting our first 1.5 beta release (to include the material3 library).
    wearos 1
    ๐Ÿš€ 2
    m
    m
    g
    • 4
    • 5
  • s

    stevebower

    03/14/2025, 3:41 PM
    Hi all - we have released 1.5.0-alpha11 with updates to the Pager API, semantics on CurvedModifier and new support for rotary overscroll. As flagged earlier, Wear Compose libraries are now all updated to the Kotlin 2.0 compiler. In the Material3 libary, we have released 1.0.0-alpha34. This includes updates to the Pager Scaffold API, support for an edge-swipe zone in Swipe-to-reveal and updates to a number of components to add the
    SurfaceTransformation
    parameter for use with TransformingLazyColumn. Card, ListHeader, RadioButton, CheckboxButton, SwitchButton no longer constrain their height using Modifier.height(IntrinsicSize.Min) - this has a performance benefit (as it avoids laying content out twice), but where necessary it can be added back on the modifier parameter. Please see the release notes for more details - thanks.
    l
    • 2
    • 2
  • y

    yschimke

    03/31/2025, 7:03 AM
    https://halilibo.com/2024/why-text-gets-jittery-when-scaled-on-android.html
    ๐Ÿ‘ 5
    ๐Ÿ‘๐Ÿผ 2
    ๐Ÿ™ 1
  • l

    Lauri Koskela

    04/28/2025, 5:06 PM
    Is it possible to use
    ComposeTestRule
    for UI automation when generating baseline profiles? UiAutomator does not really seem to work that well with compose+wear (e.g.
    scrollUntil
    does not detect scrolling), and I'm wondering if Compose's better UI testing APIs could be used here I tried to use
    createEmptyComposeRule
    but that does not seem to work either ("No compose hierarchies found in the app")
    y
    s
    • 3
    • 9
  • l

    Lauri Koskela

    05/04/2025, 12:44 PM
    Can someone explain what's going on here with horizontal scrolling? I'm seeing an issue where scrolling an element horizontally sometimes just triggers the system activity swipe-to-dismiss action instead of scrolling. This happens almost all the time on my real device (Galaxy Watch 5) and a bit less frequently in an emulator. It kind of feels like there's some race condition in
    scrollable
    implementation that sometimes passes drag gestures to the activity and some times not. Here's a minimal sample:
    Copy code
    class MainActivity : ComponentActivity() {
        override fun onCreate(savedInstanceState: Bundle?) {
            installSplashScreen()
            super.onCreate(savedInstanceState)
            setContent { WearApp() }
        }
    
        override fun onTouchEvent(event: MotionEvent?): Boolean {
            Log.d(TAG, "onTouchEvent: $event")
            return super.onTouchEvent(event)
        }
    }
    
    @Composable
    fun WearApp() {
        MyTestAppComposeTheme {
            Box(
                modifier = Modifier.fillMaxSize().padding(horizontal = 8.dp)
            ) {
                val offsetX = remember { mutableFloatStateOf(0f) }
                val scrollState = rememberScrollableState {
                    offsetX.floatValue += it
                    it
                }
    
                Box(
                    modifier = Modifier
                        .fillMaxRectangle()
                        .border(width = 1.dp, color = Color.White)
                        .scrollable(scrollState, Orientation.Horizontal)
                    contentAlignment = Alignment.Center
                ) {
                    Text(offsetX.floatValue.toString())
                }
            }
        }
    }
    This renders a box that is horizontally swipeable. As far as I know it should never let the activity swipe-to-dismiss trigger as long as the scrolling gestures start inside the box, right? Defining horizontal scroll semantics mostly fixes this; for example adding this after
    .scrollable
    in the above snippet
    Copy code
    .semantics {
        horizontalScrollAxisRange = ScrollAxisRange(
            { offsetX.floatValue }, { 100f /* dummy value */ })
    },
    Is it a bug or should this be working without the semantics modifier? I know horizontal scrolling has been discussed many times here but I could not find this particular issue anywhere
    s
    • 2
    • 1
  • s

    stevebower

    05/08/2025, 10:49 AM
    Hi all - I'm delighted to announce that the Wear Compose team has released 1.5.0-beta01, the first beta release for the Wear Compose Material3 library. Additional API changes in this release: the hierarchical focus API now splits the functionality between modifiers for the focus handling and a new LocalScreenIsActive composition local that can be checked to tell if a screen is the currently active one; SwipeToReveal has been updated so that the experimental Foundation API is now deprecated and those parts that are still used have been migrated to the material and material3 libraries - the release notes give more details on this iteration, which removes the SwipeToReveal DSL and makes use of slots for primary, secondary and undo actions. Bug fixes: performance improvements to ScrollIndicator and LocalReduceMotion; fixed issues with EdgeButton and TransformingLazyColumn animations; updated motion of indeterminate CircularProgressIndicator; SwipeDismissableNavHost focus issue addressed; corrected the default alignment for ListHeader and ListSubHeader. Please also see the release notes for a summary of the new components and features, as well as more details on the items called out above - thanks.
    ๐ŸŽ‰ 5