Skip to content

Changing orientation in media detail view resets fragment_media_detail #389

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

Closed
domdomegg opened this issue Mar 5, 2017 · 4 comments
Closed
Labels

Comments

@domdomegg
Copy link
Member

Changing orientation while viewing a file shows the template fragment_media_detail

screenshot_20170305-172543

@domdomegg domdomegg changed the title Turning to landscape mode resets fragment_media_detail Changing orientation in media detail view resets fragment_media_detail Mar 5, 2017
@misaochan
Copy link
Member

Uh, wow. Good find, lol.

@misaochan misaochan added the bug label Mar 5, 2017
@domdomegg
Copy link
Member Author

Had a deeper look, caused in MediaDetailFragment.java#L131. Normally, media is never null, however when onCreateView is called after orientation change it is for some reason.

index is the same regardless of how onCreateView was called, so it has to be something about detailProvider

@domdomegg
Copy link
Member Author

Some more information for troubleshooting, when onCreateView is called normally, getTotalMediaCount returns 468 (the number of files I have uploaded). When called from orientation change it returns 0.

@neslihanturan
Copy link
Collaborator

I think #639 solved this issue. If not, please reopen it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants