This sample is not working with the latest compose...
# compose
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
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?
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 app
@Ralston Da Silva Maybe I missed some initial setup in the root?
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 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:[…]compose/ui/demos/scroll/BringRectangleIntoViewDemo.kt
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
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
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