You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue is about resolving the getTargetFragment() and setTargetFragment(...) compile warnings for the WordPress module, and possibly, for the lib modules as well.
PS: Some of those warnings are already deprecated (see here).
Instead of using a target fragment to pass results, the fragment requesting a result should use FragmentManager.setFragmentResultListener (String, LifecycleOwner, FragmentResultListener) to register a FragmentResultListener with a requestKey using its parent fragment manager. The fragment delivering a result should then call FragmentManager.setFragmentResult(String, Bundle) using the same requestKey. Consider using setArguments to pass the requestKey if you need to support dynamic request keys.
Instead of using a target fragment to pass results, use FragmentManager.setFragmentResult(String, Bundle) to deliver results to FragmentResultListener instances registered by other fragments via FragmentManager.setFragmentResultListener(String, LifecycleOwner, FragmentResultListener).
Parent #17173
This issue is about resolving the
getTargetFragment()
andsetTargetFragment(...)
compile warnings for theWordPress
module, and possibly, for the lib modules as well.PS: Some of those warnings are already deprecated (see here).
FragmentManager.setFragmentResultListener (String, LifecycleOwner, FragmentResultListener)
to register aFragmentResultListener
with arequestKey
using its parent fragment manager. The fragment delivering a result should then callFragmentManager.setFragmentResult(String, Bundle)
using the samerequestKey
. Consider usingsetArguments
to pass therequestKey
if you need to support dynamic request keys.FragmentManager.setFragmentResult(String, Bundle)
to deliver results toFragmentResultListener
instances registered by other fragments viaFragmentManager.setFragmentResultListener(String, LifecycleOwner, FragmentResultListener)
.For more info see:
The text was updated successfully, but these errors were encountered: