Skip to content
This repository has been archived by the owner on Feb 8, 2022. It is now read-only.

Scroll Type Animation doesn't restore properly when state is lost (e.g. Don't Keep Activities Enabled) #10

Open
babramovitch opened this issue Jun 27, 2018 · 0 comments

Comments

@babramovitch
Copy link

babramovitch commented Jun 27, 2018

I'm using an animation similar to the AnimScrollActivity and ran into issue when I tested restoring my app from state loss.

In developer settings I turned on "Don't keep activities" and then I opened the app and scrolled the activity all the way up which works as expected. I then leave the app and return, and the animation is now like this

afterreturning

If I then scroll, it turns into this

afterscrolling

I've tried things like adding this into the onCreate but it causes an animation at the start, and still doesn't fully place items in the correct spots, and if I take it out of the post, it's wrong right away.

 scrollview.post {
            scrollview.scrollTo(0, 0)
            animation.reset()
 }
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant