https://kotlinlang.org logo
Join Slack
Powered by
# compose
  • k

    Kyrylo

    08/21/2025, 7:56 AM
    Hi everyone, i would like to share text resources between ios/android, but when it comes to static XCFramework size - skia seems to add too much size. I just found that
    compose-resources
    has multiple source sets. The question is: is it possible to use compose resources but exclude whole skiko/skia in iOS XCFramework?
    k
    e
    • 3
    • 2
  • l

    Lukasz Kalnik

    08/21/2025, 11:34 AM
    We have an
    OutlinedTextField
    where we set
    keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Decimal)
    . However on a Samsung S20 with Samsung keyboard, even with a German language setting, it only shows the dot key, and the comma key is greyed out. However in German the decimal separator is the comma and it should be active. Did anyone encouter that?
    z
    • 2
    • 6
  • q

    Quentin Suchet

    08/22/2025, 2:49 PM
    Hey all 🙂 I'm having a Snapshot
    State
    read error:
    Reading a state that was created after the snapshot was taken or in a snapshot that has not yet been applied
    I know questions regarding this have already been posted here, and OPs always ended up realizing that they've been creating a
    State
    after snapshot was taken and then reading from it in the said snapshot, triggering the expected error. But I have created a minimal working (actually crashing) example where I feel like the issue is not caused by this (or is it ?) I create a MutableState as a global variable, before any composition happen, and then never create any other state. So, no snapshot happened yet (right ?) I then read it in a
    @Composable
    and do a bunch of write from another thread -> This trigger the error. From my understanding, this should not cause any issue. Yes there will be inconsistency with the state with a bunch of conflicting snapshot writes and this is probably not a good pattern, but why is it crashing ? Code and more info in 🧵
    s
    • 2
    • 3
  • h

    Hristijan

    08/22/2025, 2:50 PM
    Does anyone suffer from this issue on CMP navigation as well? We can't reproduce it but it happens on crahslytics we noticed it both on Android and iOS https://issuetracker.google.com/issues/440277810
  • t

    Tao Bai

    08/22/2025, 10:17 PM
    I am moving the Jetpack compose to CMP gradually, I already had a shared Module and don't want to create a new project, so I copied CMP setup from a new CMP project, now, currently it compiled, but no resources can be loaded at runtime, I must miss something, any clue?
    l
    • 2
    • 2
  • j

    Jaypalsinh Barad

    08/23/2025, 7:23 AM
    Issue: Compose Navigation, if Focus on element "Card 5" and navigate to some screen after press back focus is going to element "Card 4" instead of "Card 5" I share video and code
    Screen_recording_20250823_124500.mp4
    🧵 2
    s
    • 2
    • 6
  • t

    Tolriq

    08/23/2025, 8:25 AM
    Starting again to get some
    layout state is not idle before measure starts
    crashes with Compose 1.10 alpha 1. Last time it was some obscure bug with viewpager found by luck. Would it be possible for Compose to log the actual state it is in for that crash to help? Or is there anything I could log about current state if i was to catch the measure issue in the Layout ?
    s
    • 2
    • 7
  • r

    Rohit Neel

    08/23/2025, 11:08 AM
    Hello Everyone, I am working on moving TalkBack accessibility focus across multiple menus. Currently, the focus moves correctly to the first menu when navigating back from another screen using the back button, but not to the second and third which focus always stays on back icon. I have created three FocusRequester objects and, based on the selected menu, I call requestFocus(). I am passing these requester objects as a Triple to another composable and then applying them in three different menus using modifier.focusRequester(focusRequesters.first) (and similarly for the others). However, I am not sure what might be going wrong. Please find the code snippet with issue video in thread accessibility
    l
    • 2
    • 19
  • s

    shivthepro

    08/24/2025, 12:59 AM
    Hey anyone got into this situation ? Introducing compose in a legacy code base and we are using Glide for View system. Looking at glide for compose and found that its not stable and still on beta release from 2023 😢. I believe Introducing coil means introducing a separate image caching system in the app now where glide and coil exists in parallel which can significantly increase app size. Need answers on how you solved it. Vote plus1 if you are stuck on the same situation. Thanks In Advance !
    g
    • 2
    • 5
  • v

    Vivek Modi

    08/24/2025, 1:58 PM
    Hey everyone, I recently updated my Compose Multiplatform plugin to
    1.9.0-beta03
    and switched to Material 3
    1.9.0-beta03
    . After the update, I can no longer access
    CircularWavyProgressIndicator
    or
    ButtonDefaults.MediumContainerHeight
    . Has anyone else run into this issue? I’ve attached my
    libs
    and
    gradle
    files for reference.
    k
    d
    • 3
    • 7
  • s

    Slackbot

    08/25/2025, 7:38 AM
    This message was deleted.
    c
    • 2
    • 1
  • d

    Dumitru Preguza

    08/25/2025, 7:48 AM
    How do you deal with UI blinks when the state updates too fast then it goes back (example showing the loading icon but the server responds too fast and the icon appears just for 100-200 ms) ? Is there any libs to fix this ? Maybe a debounce function would work
    a
    t
    p
    • 4
    • 12
  • u

    ursus

    08/25/2025, 10:28 PM
    I'm trying to create something like
    Animoji
    that Apple has. I know how to extract camera frames, then extract landmarks to drive the 3D object - but I don't know how to render the 3D object with Compose. Is it possible to render a 3D object in compose? Or maybe some 3D technology Compose can call into?
    r
    • 2
    • 22
  • m

    Michael Paus

    08/26/2025, 8:58 AM
    Is it a known issue that scrollbars in CMP behave differently on different platforms and also differently from native or Swing applications? I just realized that when you create a wasmJs app with some scrollable area and a scrollbar, you can click into the scrollbar and scroll it by moving the mouse around as long as you hold the mouse button down. However, this stops as soon as the mouse exits the window. This behaviour just doesn’t feel right and it is different from the behaviour of the same app on the desktop platform and the behaviour of native applications. I have tested this only on macOS and don’t know what the behaviour and expectation is on Windows or Linux.
    ➕ 2
    e
    • 2
    • 1
  • a

    Alexander Maryanovsky

    08/26/2025, 1:14 PM
    Is there a way for a newly added element to immediately read the layout bounds of its parent, and what is the best way in general to read that? Code inside.
    l
    • 2
    • 5
  • k

    krkoo3

    08/26/2025, 5:04 PM
    👋 Hello, team!
    🚫 5
  • s

    Sudarshan

    08/27/2025, 10:05 AM
    Hey friends, is it possible to change the locale of a Compose Multiplatform app in real-time across all platforms? For example, updating the app’s language instantly when the user selects their preferred language. If yes, could someone guide me on how to achieve this?
    k
    p
    o
    • 4
    • 6
  • t

    Tolriq

    08/27/2025, 6:52 PM
    Is there any change in Compose 1.10 alpha 2 that could explain a change in handling derivedState ? (See thread)
    w
    z
    • 3
    • 7
  • a

    Ammar Abdullah

    08/28/2025, 9:22 AM
    Anyone used jetpack compose navigation3 for production app. is it stable enough to use for large scale app at production level?
    j
    • 2
    • 1
  • s

    Stefano

    08/28/2025, 9:44 AM
    Hello everyone, i want to integrate an interactive map 🗺️ in a Compose Multiplatform project (Android and iOS only), what solution would you recommend me? Thank you in advance 💪
    m
    • 2
    • 1
  • t

    Timo Drick

    08/28/2025, 11:36 AM
    I do have a problem initializing a mutablestate for compose. The following code will show in the composable the text "Init" instead of "Loaded"
    Copy code
    class TestViewModel(ctx: Application): AndroidViewModel(ctx) {
        var value by mutableStateOf("Start")
    
        init {
            value = "Init"
            viewModelScope.launch(Dispatchers.IO) {
                value = "Loaded"
            }
        }
    }
    @Composable
    fun Test(vm: TestViewModel = viewModel()) {
        Text(vm.value)
    }
    When i change the init to:
    Copy code
    init {
        value = "Initialized"
        viewModelScope.launch(Dispatchers.IO) {
            withContext(Dispatchers.Main) {
                value = "Loaded"
            }
        }
    }
    It shows "Loaded" Also a delay would make the code work. Normally i think changing a compose state variable it is not necessary to be on the UI Thread
    z
    a
    • 3
    • 7
  • l

    Lisadasmohapatra414

    08/29/2025, 10:16 AM
    Hi everyone, I have a doubt. have a doubt I wanted to create a Compose Multiplatform library whose code can be used on both Android and iOS, and from which an AAR can also be generated. I am new to KMP
    o
    • 2
    • 2
  • l

    Lukasz Kalnik

    08/29/2025, 1:55 PM
    I have a device (customer scanner in a supermarket) which runs in kiosk mode, i.e. the user is not allowed to leave the app. Status and navigation bars are hidden. However, when I show a
    ModalBottomSheet
    (BTW happens with a
    Dialog
    as well), the device leaves the kiosk mode and displays the status/navigation bars. Screenshots in 🧵
    👀 1
    • 1
    • 4
  • a

    Alexander Maryanovsky

    08/30/2025, 12:45 PM
    Is there a way to get the real, physical, bounding box of a character or a line from a
    TextLayoutResult
    ?
    getBoundingBox
    returns
    Copy code
    Rect.fromLTRB(0.0, 0.0, 15.4, 33.0)
    Rect.fromLTRB(15.4, 0.0, 32.6, 33.0)
    Rect.fromLTRB(32.6, 0.0, 48.3, 33.0)
    on a string like
    abc
    , but obviously the real bounding box’s top of these charaters is not 0.
    r
    z
    • 3
    • 4
  • p

    prasanna

    08/31/2025, 5:58 PM
    I want the foster blur background like IOS i tried different approaches too get like that in the android but I am not able to get that it only diming the background to grey like in the image, help me out of this
    p
    s
    • 3
    • 5
  • p

    prasanna

    09/01/2025, 8:57 AM
    Hii Devs I want this running line loading like slack on the top of the card.I tried some ways but the line is not moving from left to right, anyone please help me out of this!!!
    kodee happy 1
  • m

    min

    09/01/2025, 11:55 AM
    Hello everybody, I’m new to Android development and have a question about Jetpack Compose: I understand that the ‘compiler’ (Kotlin compiler plugin) transforms every
    @Composable
    to inject an output parameter of sorts at compile time via which composables build a composition. I suppose that ‘recomposition scopes’ emitted into the composer by composables somehow correspond to snapshots, and that once a recomposition scope has been invalidated because a state has changed, a rerun of the corresponding composable is scheduled. But where is the code that actually does this? My
    MainActivity
    is a
    ComponentActivity
    , I’ve had a quick look at the call graph that starts from the call to
    .setContent
    in the
    onCreate
    method but couldn’t identify whatever is orchestrating this chain of events
    c
    • 2
    • 3
  • h

    Hammad Qaiser

    09/02/2025, 9:29 AM
    Hey everyone, hope all goes well. Having trouble with
    NestedScrollConnection
    . More in 🧵
    • 1
    • 1
  • l

    Lukasz Kalnik

    09/02/2025, 9:34 AM
    My
    UiState
    contains an
    action
    property, which when set, should start an activity from the Composable. However on some devices the activity is started twice. Code in 🧵
    s
    • 2
    • 29
  • a

    Abhimanyu

    09/02/2025, 2:32 PM
    Hi 👋 , I am trying to use the new state based TextField. I have a single StateFlow exposed from the ViewModel that contains the state of the screen. I am following the example shared in the docs here - https://developer.android.com/develop/ui/compose/text/migrate-state-based#conforming-approach. The problem with this approach is, the initial state emitted by the ViewModel would have empty string as the default value for the text field. The actual initial state of the Text Field would be emitted after the required data is fetched from local database. But, this code does not update the
    TextFieldState
    with the subsequent values emitted from the viewmodel.
    Copy code
    val usernameState = rememberTextFieldState(initialUiState.username)
    LaunchedEffect(usernameState) {
      snapshotFlow { usernameState.text.toString() }.collectLatest {
        loginViewModel.updateUsername(it)
      }
    }
    Could anyone please help share how to solve this?
    e
    w
    z
    • 4
    • 23