A New Way to Handle Back Press in Fragments
Using the new ’OnBackPressedDispatcher’ in Android fragments
Published in
3 min readOct 12, 2020
If you’ve been an Android developer for a while, the chances are you’ve handled back-press events using the onBackPressed
function in activities. That was fine until the introduction of architectural components and a single source of truth patterns.