• Zhelyazko Atanasov

    Zhelyazko Atanasov

    2 years ago
    Is this a common known issue or I'm the only one having it - Interactive Preview is not working in AS 4.2 Canary 9 / Jetpack Compose
    1.0.0-alpha02
    / Android Tools
    4.2.0-alpha09
    . AS goes into "Interactive mode", but when I start interacting, nothing happens (I have the simple demo with a button that shows the number of times it has been clicked. It was working in AS Canary 8 / Compose Alpha 1
    Zhelyazko Atanasov
    Mehdi Haghgoo
    +1
    5 replies
    Copy to Clipboard
  • Ali Zargar Shabestari

    Ali Zargar Shabestari

    2 years ago
    Adding
    clickable
    modifier inside
    LazyColumnFor
    makes the scrolling jaggy. My first thought was that ripple effect has something to do with the lag, but, as I changed the indicator to
    null
    the problem is still there. here is link to my code in a thread related to this issue: https://kotlinlang.slack.com/archives/CJLTWPH7S/p1599482698133100?thread_ts=1597241706.045300&cid=CJLTWPH7S
    Ali Zargar Shabestari
    Andrey Kulikov
    2 replies
    Copy to Clipboard
  • j

    jaqxues

    2 years ago
    Alright I think I have a more complex bug today. I have an expandable Card (representing Articles). When collapsed, the Card contains the author and sources. When expanded, it also contains a longer description. The user can save the article by long pressing on the article (Obviously there will be a button for it, just to simplify the following sample code). A state representing the saving result will be displayed in the extended layout. So the user extends the article (by clicking on the card), the user long presses (on the card), and state might show up (uses
    Random.nextInt(0, 3)
    for testing purposes) As you can see in the screenshots below (1 -> 2), when having the content in the "extendedContent" changed, the card doesnt expand more to fit the contents. Now, when the Card is collapsed and expanded again (3), it resizes and looks how it should. However, if now the message disappears, it is again not resizing, meaning we have a lot of empty space (4)
    j
    3 replies
    Copy to Clipboard
  • JulianK

    JulianK

    2 years ago
    Is there a solution for remembering UI State through app navigation? For example, i have a Tab Navigation/Pager with dynamic number of pages. Each page is a scrollable list containing items. When i navigate to a "sub-view" (would have been a fragment before), i'd like to remember scroll state, so when the user goes back, the list maintains it's scroll position. Remember does not work here because the component is removed from tree. Also i can't pull remember up the tree, because its not a static number of pages/lists.
    JulianK
    jim
    +1
    4 replies
    Copy to Clipboard
  • j

    Jan Skrasek

    2 years ago
    Is there any issue/"initiative" to decompose TextField? Such simple thing as setting a background color seems quite impossible. (outline api doesn't provide bg color property, filled text field applies 0.12% transparency on the passed value...) All building blocks are internal/private 😞
    j
    Adam Powell
    +5
    10 replies
    Copy to Clipboard
  • Mehdi Haghgoo

    Mehdi Haghgoo

    2 years ago
    When a composable function is invoked, the invocation might occur on a different thread from the caller. That means code that modifies variables in a composable lambda should be avoided–both because such code is not thread-safe, and because it is an impermissible side-effect of the composable lambda. -link
    Parallel execution in Compose is very new to me. Could someone tell me please how I can modify variables if I am not allowed to do it in a Composable lamda? Also, what does thread-safety mean in the above paragraph?
    Mehdi Haghgoo
    manueldidonna
    2 replies
    Copy to Clipboard
  • v

    Victor Yakovlev

    2 years ago
    How to set height to
    fillMaxHeight
    inside component where height is
    wrapContentHeight
    ?
    v
    Adam Powell
    +1
    16 replies
    Copy to Clipboard
  • Ali Zargar Shabestari

    Ali Zargar Shabestari

    2 years ago
    I’m facing a problem with
    LazyColumnFor
    . The problem is kind of hard to explain, so I included a video. depensing on the scroll position of Column recomposing with a subset list of items leads to empty list.
    Ali Zargar Shabestari
    manueldidonna
    4 replies
    Copy to Clipboard
  • Ali Zargar Shabestari

    Ali Zargar Shabestari

    2 years ago
    I’m not sure is I’m doing something wrong, but in my app the content in
    scaffold
    is drawn behind the
    bottomBar
    . is this the expected behaviour? The content:
    Text(modifier = Modifier.verticalScroll(rememberScrollState()),text = <a Long content>)
    Ali Zargar Shabestari
    manueldidonna
    +2
    5 replies
    Copy to Clipboard
  • manueldidonna

    manueldidonna

    2 years ago
    BottomNavivation
    composable (green accent) has a different ripple than
    BottomNavigationView
    (red accent) from Material Components for Android (which is the same effect showed in the material guidelines)
    manueldidonna
    l
    5 replies
    Copy to Clipboard