• Afzal Najam

    Afzal Najam

    2 years ago
    It seems like if I start an external activity (like the
    ACTION_VIEW
    Intent with a Uri) and then press back to come back to my compose-based app, the Composable parts aren't recomposed. The containing activity gets onStart and onResume called as expected. Does that mean I should be creating my app in onStart instead of onCreate? Or is there a way to detect this from within composables? I'm expecting a state change upon returning to the app, based on something that happens in the activity's onStop when the app loses focus. Edit: Is the right way to use
    LiveData.observeAsState()
    ? It seems like that works.
    StateFlow.collectAsState()
    didn't work as well, seems like some weird race condition in my code.
    Afzal Najam
    j
    4 replies
    Copy to Clipboard
  • galex

    galex

    2 years ago
    Wouuuahhhh you can’t set
    .dp
    on a
    TextStyle
    ? Bold of Compose to fight directly the designers of the world 😂
    Text(
        text = "Save this dough recipe!",
        style = TextStyle(fontSize = 16.dp) // doesn't compile
    )
    galex
    John O'Reilly
    +1
    4 replies
    Copy to Clipboard
  • m

    MBegemot

    2 years ago
    Is it possible to load an image from file? Like the ImageView.setImageBitmap? without having to use glide or Picasso , if so which will be the preferred type of image png jpeg? Thanks a lot!!
    m
    1 replies
    Copy to Clipboard
  • l

    Loboda Deni

    2 years ago
    Hello. Does anyone know an analogue of SwipeToRefreshLayout?
    l
    galex
    2 replies
    Copy to Clipboard
  • m

    mzgreen

    2 years ago
    m
    1 replies
    Copy to Clipboard
  • andylamax

    andylamax

    2 years ago
    The compose compiler treats compose functions in much similar way the kotlin compiler does to suspend functions. Correct? My curiosity is, why did the Compose Dev team decide to go with annotations (i.e.
    @Compose
    ) instead of making compose a reserved word, similar to suspend functions? Knowing this was much influenced by JB, if the annotations approach seemed more convenient, why didn't they go with it for suspend functions? (i.e
    @Suspend
    )
    andylamax
    shikasd
    +1
    5 replies
    Copy to Clipboard
  • d

    divyanshunegi

    2 years ago
    Hi, Everyone I just started exploring Compose and coming from SwiftUI this feels at home, I tried looking for documentation on all the available API but could not find it, can someone please guide me to the Compose API docs (If they exist) ?
    d
    1 replies
    Copy to Clipboard
  • amar_1995

    amar_1995

    2 years ago
    I am trying to implement refreshing in a composable list. But after refreshing clickable stops working. I think there is some issue with my approach but I am unable to get it.https://github.com/amar1995/ModularNewsApp/blob/main/app/src/main/java/com/amar/modularnewsapp/ui/article/ArticleView.kt#L51
    amar_1995
    galex
    2 replies
    Copy to Clipboard
  • galex

    galex

    2 years ago
    Hello, is there a way to blur a Composable? 😱 If not, how could I achieve that?
    galex
    aiidziis
    +1
    5 replies
    Copy to Clipboard
  • Yashovardhan

    Yashovardhan

    2 years ago
    Checkbox has this weird white dot in the center when using dark theme colour pallete. It works fine otherwise. It even looks fine with the light theme colours.
    Yashovardhan
    Nader Jawad
    +1
    5 replies
    Copy to Clipboard