Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sticky header does not appear after returning to list screen #698

Open
VitaliBov opened this issue Dec 17, 2018 · 4 comments
Open

Sticky header does not appear after returning to list screen #698

VitaliBov opened this issue Dec 17, 2018 · 4 comments

Comments

@VitaliBov
Copy link

Hello. Thank you for the great library.
I had a problem with sticky headers. I need to show a sticky header when displaying the fifth item in the list. Header disappears when you click "OK" or "Cancel". The appearance of the header and its disappearance animated. I decided to initially call the setDisplayHeadersAtStartUp(true) method. Header container initially invisible.
My procedure is:

  1. In the onViewCreated method, the adapter and RecyclerView are initialized
  2. I open the detailed screen
  3. After returning to the list screen, the method onViewCreated called again, but the sticky header does not appear.

Fragment:
1
4

Adapter:
5

Item:
3

Header:
2
7

ezgif com-video-to-gif 2

@davideas
Copy link
Owner

@VitaliBov, do you rebuild the fragment after returning from details? Or you push a new Activity on top?

What logs say? Adapter.enableLogs(level..)

@VitaliBov
Copy link
Author

VitaliBov commented Dec 17, 2018

@davideas, I rebuild the fragment.

At the beginning:
image
image
image
image
image

After returning to the list:
image
image
image

@davideas
Copy link
Owner

Thank, I will analyse the logs, but I strongly suggest to open a new Activity, at least it resolves immediately your issue.

@VitaliBov
Copy link
Author

@davideas Yes, when using Activity, the problem does not occur. We use architecture with Single Activity, and we would like to implement everything in fragments.

@davideas davideas added this to the StickyLayoutManager milestone Mar 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants