-
Notifications
You must be signed in to change notification settings - Fork 238
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
BraintreeFragment to child FragmentManager #252
Comments
I think this is a reasonable ask, we can add the overloaded method! We'll do some investigation and get back to you, unless you're willing to open a PR! I think this would be the signature to solve this request.
I think this is also reasonable, but it may cause some confusion for integrators which means we may not want it added at this time. BraintreeFragment depends heavily on being recreated payment methods that show UI. An example is PayPal browser switch, switching from the Activity to CCT to authorize PayPal, and then coming back to the merchant activity, intercepting the browser switch result. I could see the fragment being accidentally removed and not re-attached for these cross app flows. I can play around with it though and see what happens! Regardless, you can remove BraintreeFragment by the tag as you wish! Just caution that flows away from your app may depend on BraintreeFragment being available when resuming. |
I definitely want to. (I expect early next week.) |
…agmentManager).
…agmentManager).
…agmentManager).
Issue #252 - BraintreeFragment with child FragmentManager.
Released in 3.1.0. Thanks again for the PR! |
Was my pleasure. Thx for the release. |
General information
Issue description
Our application in general works with representing scenes with
Fragments
which are hosted by a single activity. As the customer navigates in the app, the sceneFragments
are replaced in the Activity.One of such
Fragment
is our 'checkout experience'. On thisFragment
, we take care of usingBraintreeFragment
. The SDK only allows attaching theBraintreeFragment
to theFragmentManager
of the hostActivity
. As a result, when the customer leaves the checkout scene, theBraintreeFragment is still there.
We'd like to be able to attach
BraintreeFragment
toFragment.getChildFragmentManager
so that we don't have to be concerned about what remains there on theActivity
when the customer leaves the checkout scene.BraintreeFragment.newInstance
overload that accepts aFragment
instead ofActivity
and attaches to the childFragmentManager
?BraintreeFragment
? Or shall we simply useBraintreeFragment.TAG
, still somewhat relying on whatnewInstance
does internally?I found #245 somewhat connected because of #245 (comment)
The text was updated successfully, but these errors were encountered: