-
Notifications
You must be signed in to change notification settings - Fork 144
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
Fixed callback if DialogFragment called from an other Fragment #39
base: master
Are you sure you want to change the base?
Conversation
Thanks for the patch. I think that's a good idea. Do you think you could also add some tests for around the new behavior? |
@@ -250,7 +251,14 @@ private void adjustResourceLightness() { | |||
public void onAttach(Activity activity) { | |||
super.onAttach(activity); | |||
try { | |||
mListener = Option.some((OnFragmentInteractionListener) activity); | |||
if (activity instanceof OnFragmentInteractionListener) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we now have proper checks in place, we no longer need to catch the ClassCastException
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^
@yurezcv Hey, are you still interested in getting this in? |
@passy Hi, sorry. I have a lot of stuff to do. But I'm interested. |
@yurezcv No worries, I'm in the same boat. :) Just the two things mentioned above, ie. the class cast and removing the unnecessary changes to the XML files. |
ping |
I'm here :) |
@yurezcv Cool, the rest is okay the way it is. So it's only left to the class cast. :) |
hey, |
@b3nson I don't have time to pick this up at the moment. Do you want to address the comments? Would be happy to review it. |
Good day to you.
I have been trying to use your library in my own project.
And I found out that if I start DialogFragment from an Fragment then I don't receive the interface callback there, but I receive it on Activity which has started this Fragment.
So I decided to add small changes to your library.
Please, check it, if everything is allright I will be very happy to help you :)