clear previous screen after redirection ( clear back stack for fragment ) kotlin
I have onle activity and many fragments in my project. I have created splash screen fragment and redirecting to dashboard after 3 seconds. After I went to dashboard I pressed on back button which takes me back to the splash screen. It should not happen. how to clear previous screen after redirection. for example after successful payment we will be redirected to some screen and when we press back button it should not go to payment screen right?. I need to know how to clear the backstack in...