Android SDK Version


public final class FragmentWrapper
com.facebook.internal is solely for the use of other packages within the Facebook SDK for Android. Use of any of the classes in this package is unsupported, and they may be modified or removed without warning at any time.
This is a wrapper to unify androidx (support library) fragments and the native (legacy) fragments so that it's easy to call startActivityForResult(), even this method is deprecated. This class is kept mainly for back-compatibility.
Field Summary
Modifier and TypeFieldDescription
private FragmentsupportFragment
private FragmentnativeFragment
private final Activityactivity
Constructor Summary
ConstructorDescription
FragmentWrapper(Fragment fragment)
FragmentWrapper(Fragment fragment)
Method Summary
Modifier and TypeMethodDescription
final FragmentgetSupportFragment()
final UnitsetSupportFragment(Fragment supportFragment)
final FragmentgetNativeFragment()
final UnitsetNativeFragment(Fragment nativeFragment)
final ActivitygetActivity()
final UnitstartActivityForResult(Intent intent, Integer requestCode) Call Activity.startActivityForResult from the fragment's containing Activity.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail

FragmentWrapper

FragmentWrapper(Fragment fragment)

FragmentWrapper

FragmentWrapper(Fragment fragment)
Method Detail

getSupportFragment

 final FragmentgetSupportFragment()

setSupportFragment

 final UnitsetSupportFragment(Fragment supportFragment)

getNativeFragment

 final FragmentgetNativeFragment()

setNativeFragment

 final UnitsetNativeFragment(Fragment nativeFragment)

getActivity

 final ActivitygetActivity()

startActivityForResult

 final UnitstartActivityForResult(Intent intent, Integer requestCode)
Call Activity.startActivityForResult from the fragment's containing Activity.