M
M
Mertana2015-12-28 01:06:37
Android
Mertana, 2015-12-28 01:06:37

How to return the scroll in Android ListView to its place?

Problem: There is a list that has an impressively sized animated header. The hat can unfold and fold back on click.
d4924e78d13f494e97d384d797d555f0.png
This is the initial state of the list.
6d7b244962e541b289df3991fe2cdd5a.png
This is a list with expanded header, in reality the header can be larger.
8bc2b2766e20472694c151ece6e1158d.png
After the header is collapsed, the scrollPosition of the list is not at the beginning, but rewinded down by a certain number of points.
How can I make the list itself scroll up along with the header collapse animation so that when the animation ends, the list is scrolled to the beginning? The option to scroll the list to the beginning after the end of the animation looks wretched. The option to move the hat so that it floats to the side, unfortunately, is also not suitable, the design is drawn like this.
Or try to fix the header somehow so that the list scroll does not crawl when its size changes? Or look towards Coordinator Layout? In general, a complete stupor and Google does not help.
Thanks in advance to those who didn't pass by)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
aol-nnov, 2015-12-28
@aol-nnov

and there is such a thing. won't fit? Or is that how you add the hat?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question