Skip to content
This repository was archived by the owner on Jan 21, 2025. It is now read-only.

RuntimePermissions lifecycle observer and AndroidX transitions for fragments

Choose a tag to compare

@dmitriy-chernysh dmitriy-chernysh released this 23 Apr 19:30
· 37 commits to master since this release
  • Added lifecycle observer to request and handle Runtime Permissions
val  permissionsObserver = RuntimePermissionObserver(requireActivity())
lifecycle.addObserver(permissionsObserver)

permissionsObserver.launch(
            arrayOf(Manifest.permission.CAMERA),
            onShouldShowRationale = {},
            onGranted = {},
            onDenied = {}
)
  • Fixed transision animation for fragments. R.amin.xxx didn't work properly with a new androidx.fragment dependency. Use AndroidX transitions instead.
class ProfileSettingsFragment : BaseFragment<FragmentProfileSettingsBinding>(
    layoutId = R.layout.xxxxxxxxx,
    FragmentSettings(
        .....
        enterTransition = RApp.transition.slide_right
    )
)