rsktash

    rsktash

    1 year ago
    This sample is not working with the latest compose(jetbrains compose). Is something going to be changed? BringIntoViewDemo
    Also tried with latest jetpack compose version. Not workinig
    Seems to be a bug
    @Ralston Da Silva
    r

    Ralston Da Silva

    1 year ago
    Thanks for reporting this, let me check and get back to you
    Hi Rustam, I tried the tip of tree version, and this is working. What version of compose are you using?
    rsktash

    rsktash

    1 year ago
    Hi. The latest alpha 1.1.0 alpha 2
    I’m testing with real device - Samsung S10
    The same with an emulator
    I tested with all three versions Here is my sample apphttps://github.com/rustamsmax/compose-report
    @Ralston Da Silva Maybe I missed some initial setup in the root?
    r

    Ralston Da Silva

    1 year ago
    Thanks for the repro. I investigated this, and was able to reproduce this. It took me a while to figure out what was going on: You are using
    1.1.0 alpha01
    instead of
    1.1.0alpha02
    https://github.com/rustamsmax/compose-report/blob/main/build.gradle In Alpha 1, scrollables didn't have relocation support, and needed a helper modifier. In Alpha 2 scrollables have inbuilt relocation support, so you don't need the helper modifier. To fix this, you can either use
    compose_version = '1.1.0-alpha02'
    or stick with what you have and use the helper modifier. Here is a diff of the 2 demos: https://android-review.googlesource.com/c/platform/frameworks/support/+/1781493/5/compose/ui[…]compose/ui/demos/scroll/BringRectangleIntoViewDemo.kt
    rsktash

    rsktash

    1 year ago
    Thank you for your time. But when I use alpha 02 with horizontalScroll without any extension function the sample code is not working. I pushed the changes
    With the older version I used the extension function horizontalScrollWithRelocation it works
    r

    Ralston Da Silva

    1 year ago
    I didn't get a chance to debug your project, but here is the project I used to repro the issue and it works with alpha 02
    rsktash

    rsktash

    1 year ago
    I found the issue when I changed compose version to latest 1.1.0- alpha 2 the foundation dependency version was still 1.0.0 version. Then I forced it to latest via gradle adding constraints {}
    Now it’s working with last version of Jetbrains Compose which includes Jetpack Compose 1.1.0-alpha04