BraintreeFragment to child FragmentManager
See original GitHub issueGeneral information
- SDK/Library version: 2.22.0
- Environment: all
- Android Version and Device: n/a
- Braintree dependencies:
- com.braintreepayments.api:braintree:2.22.0
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 scene Fragments
are replaced in the Activity.
One of such Fragment
is our ‘checkout experience’. On this Fragment
, we take care of using BraintreeFragment
. The SDK only allows attaching the BraintreeFragment
to the FragmentManager
of the host Activity
. As a result, when the customer leaves the checkout scene, the BraintreeFragment is still there.
We’d like to be able to attach BraintreeFragment
to Fragment.getChildFragmentManager
so that we don’t have to be concerned about what remains there on the Activity
when the customer leaves the checkout scene.
- Question 1) Would you be able to provide a
BraintreeFragment.newInstance
overload that accepts aFragment
instead ofActivity
and attaches to the childFragmentManager
? - Question 2) Would you be able to provide means of removing the attached
BraintreeFragment
? Or shall we simply useBraintreeFragment.TAG
, still somewhat relying on whatnewInstance
does internally?
I found #245 somewhat connected because of https://github.com/braintree/braintree_android/issues/245#issuecomment-467096133
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (4 by maintainers)
Top GitHub Comments
I definitely want to. (I expect early next week.)
Was my pleasure. Thx for the release.