althaf
07/28/2021, 6:08 AMpackage com.abcd.registration
internal fun
Fragment.showUserAlreadyRegisteredOnAnotherDevice(actionProceedToRegister: (() -> Unit)?,
actionCancel: (() -> Unit)?) {
activity?.supportFragmentManager?.let {
var alreadyRegisterAnotherDeviceBottomSheet: AlreadyRegisterAnotherDeviceBottomSheet =
AlreadyRegisterAnotherDeviceBottomSheet.getInstance(
actionProceedToRegister,
actionCancel)
alreadyRegisterAnotherDeviceBottomSheet?.show(it, "BottomSheet")
}
}
I want this to be visible to only registration package any top level package should be able to use this extension even if they are inheriting from Fragment. Is this doable. I added internal keyword, still it is not working here. Any inputs ?rnett
07/28/2021, 6:10 AMinternal
is module-only, there is no package-only modifier in Kotlin (although it's being considered, see https://youtrack.jetbrains.com/issue/KT-29227)althaf
07/28/2021, 6:17 AMTyler Hodgkins
07/28/2021, 7:08 AM