-
Notifications
You must be signed in to change notification settings - Fork 241
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
Issue #252 - BraintreeFragment with child FragmentManager. #253
Conversation
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.
Thanks for the PR! I had one comment about an API approvement for Fragment users. Otherwise this looks ready to roll!
return newInstance(activity, activity.getSupportFragmentManager(), authorization); | ||
} | ||
|
||
public static BraintreeFragment newInstance(Context context, FragmentManager fragmentManager, String authorization) |
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.
What about a public method for passing a Fragment?
This function would be a private method that both our public newInstance
would delegate to.
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.
Haha. Actually, that was my initial idea. I thought you'd like this one as the public API. Making the change...
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.
Done.
e68c925
to
2d214f9
Compare
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.
It looks like the latest addition broke a test where we pass null
as the first argument.
You should be able to get around this by duplicating the test and pass a casted null
for those tests.
Once that is fixed, we'll merge this in!
…agmentManager).
Fixed. Green again. |
@quinnjn Any news? If I might ask. |
Hi @zsoltvilagos. Looks like those additions to the Our main Android dev @quinnjn has been busy helping with some other teams, so I don't want to merge without his final stamp of approval! |
@scannillo Thx for the update. |
Sorry for the delay. Thanks for working on this! |
Solution for issue #252 , attaching BraintreeFragment to a child FragmentManager so that the instance can stay in the scope of a Fragment hosted by an Activity.