• iamthevoid

    iamthevoid

    1 year ago
    If i pass boolean inside compose navigation route like url encoded param (ex:
    login?authorized=true
    ) then later when i extract it from navigation arguments (Bundle) it appear there as
    String
    but not an as
    Boolean
    . It is a bug or feature? How can i pass
    Boolean
    between nav destinations without converting?
    iamthevoid
    1 replies
    Copy to Clipboard
  • a

    Abhishek Dewan

    1 year ago
    can someone help me understand what I might be doing wrong. I am using insets v0.13 (haven't upgraded to compose 1.0 yet). Whenever I tap the TextField, the first time the padding from the inserts work perfectly however, on subsequent runs the padding seems like it's doubled somehow. (Code in thread)
    a
    divid3d
    +1
    6 replies
    Copy to Clipboard
  • b

    Brett May

    1 year ago
    I was wondering if it is possible to use MutableStateOf with a Delegates.observable ? I want to know inside my ViewModel() subclass when my MutableState variable changes. I am looking for an equivalent of the following SwiftUI code:
    @Published var meInformation : Me? {
            didSet {
               print("MeInformation changed: \(meInformation)")
            }
        }
    This doesn’t compile for me: (unresolved reference: by)
    class AuthenticatedUser(val context: Context) : ViewModel() { 
        var meInformation: MutableState<MeInformation?> = mutableStateOf(null) by Delegates.observable("<no name>") {
            prop, old, new ->
            println("$old -> $new")
        }
    }
    I’m not sure if it matters (being new to Kotlin), but meInformation is a @Serializable object
    b
    divid3d
    +1
    4 replies
    Copy to Clipboard
  • n

    Nabeel

    1 year ago
    Any guide or tutorial on transition animations when using navigation component?
    n
    Vitaliy Zarubin
    2 replies
    Copy to Clipboard
  • Daniele Segato

    Daniele Segato

    1 year ago
    I've upgraded to
    navigation-compose 2.4.0-alpha05
    and my LazyColumns were broken. I've investigated and it looks like
    rememberSaveable
    usage without a key has been broken. Upon navigation and back it is not restored because
    currentCompositeKeyHash
    has changed. This means
    rememberLazyListState()
    doesn't work if you leave a list into a detail and than back it scrolls back up cause it creates a new
    LazyListState
    @Ian Lake I'm tagging you because I saw you are on top of this kind of issues in other comments and I suppose this information can help you solve other issues with this release. If you do not want me to ping like that I won't do it again. I can (and will) create a bug report: just do not have time now and just wanted to let you guys know of the issue as fast as I could. -- I'll link it here in a response Other issues I noticed: I had a login flow working like this: routes: • EntryPoint • Login • Registration the Entry point sent directly to either login or registration with a
    LaunchedEffect
    controlled by a StateFlow in the viewmodel. When entering the screen I would mark it to exit when coming back. This allowed me to handle the logic of setting backStackEntry arguments as results of the auth flow. with the old navigation after navigating to login the launched effect didn't receive the "go back" event until the user re-entered the entry point screen while with alpha05 it immediately execute the back call. This was fixed using
    lifecycle.whenStarted { }
    to handle the navigation back -- but you might wanna mention this as side effect in the release notes.
    Daniele Segato
    i
    +2
    19 replies
    Copy to Clipboard
  • Tgo1014

    Tgo1014

    1 year ago
    How can I know if a
    ScrollableState
    is scrollable aka all the content is already being shown?
    Tgo1014
    matvei
    4 replies
    Copy to Clipboard
  • Csaba Szugyiczki

    Csaba Szugyiczki

    1 year ago
    [Poor image quality on rotated Icon] I have a compass icon that I want to rotate so that it is always pointing to north. When the rotation is 0 everything is nice, my icon is displayed sharp. But when the rotation value is different, the icon becomes heavily pixelated. The icon is a vector image loaded with
    painterResource
    Is it possible to apply antialiasing or something similar to improve image quality?
    Icon(
        painterResource(R.drawable.ic_map_compass),
        contentDescription = stringResource(R.string.map_compass_button_content_desription),
        tint = Color.Unspecified,
        modifier = Modifier.rotate(
            -bearing
        )
    )
    Csaba Szugyiczki
    Arthur Gonzaga
    +7
    23 replies
    Copy to Clipboard
  • j

    Joey

    1 year ago
    What's the recommended way to repeat a vector as a pattern on the background of a composable? Should I convert the vector to a bitmap and draw it in a canvas with a TileMode.REPEATED Paint?
    j
    1 replies
    Copy to Clipboard
  • t

    Thiago

    1 year ago
    Hi folks. Will compose have your own code style guide or we must keep using Kotlin/Android style guide?
    t
    z
    2 replies
    Copy to Clipboard
  • Aman Kapoor

    Aman Kapoor

    1 year ago
    Has anyone tried compose on release build with debuggable on? I am getting crashes related to profileInstaller but not really sure what is the issue and it just print some native memory logs.
    Aman Kapoor
    2 replies
    Copy to Clipboard