Good day!

Tell me please. How to make scrollview in android compensate for the shift of elements when resizing them so that the window does not twitch?

A little more detail:

When scrolling through a scrollview and then interacting with one of its objects, other objects above may change in size, which causes the selected object to shift up or down relative to where the object was before interacting with it.

How to eliminate this shift?

Code example
https://drive.google.com/file/d/1dh2U-4h0Avsd88wJa1WPCE5a280OY1Ag/view?usp=sharing

Video
https://drive.google.com/open?id=1L9MrU6T86gxPs__NeW6ThZcv0-ka0Z2-

    1 answer 1

    It can not be done. Elements must be redrawn and the container is obliged to recalculate its height and sneak to the newly calculated height.

    The way you want it can be implemented through RecyclerView . If each element of your data is a separate cell of it, then it will not redraw at all, since unloaded from memory at this moment or RecyclerView without scrolling recalculates its height.