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

mOpenSourceAdapter is null #65

Closed
Themesaul opened this issue Mar 26, 2018 · 2 comments
Closed

mOpenSourceAdapter is null #65

Themesaul opened this issue Mar 26, 2018 · 2 comments

Comments

@Themesaul
Copy link

https://github.com/MindorksOpenSource/android-mvp-architecture/blob/4191a3c325a2464811fdf4c3733731f54b4902a5/app/src/main/java/com/mindorks/framework/mvp/ui/feed/opensource/OpenSourceFragment.java#L100

Sometimes mOpenSourceAdapter is null and it hangs.

Reproduce the problem in an easy way:

1- Start an intent to youtube

Intent intent = new Intent(Intent.ACTION_VIEW,Uri.parse(String.format("http://www.youtube.com/watch?v=%s", KEY))); intent.putExtra("force_fullscreen", true); itemView.getContext().startActivity(intent);

2- Press 4 times or more the button back before the video is opened

2.1 - The "onDestroyView" method is triggered when it does not have to.

3 - mOpenSourceAdapter is null and the application closes

I have tried to check if it is null and in the case that it is to start a new instance of OpenSourceAdapter but the application does not respond.

Is this normal?

@Themesaul
Copy link
Author

The problem was related to variables that were null by the change of view (the activity was destroyed) has been my problem. It only happened with the change of quick view back from the landscape mode for some strange reason.

1 similar comment
@Themesaul
Copy link
Author

The problem was related to variables that were null by the change of view (the activity was destroyed) has been my problem. It only happened with the change of quick view back from the landscape mode for some strange reason.

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

1 participant