I have a Splash_Screen
fragment. After navigating to the next fragment, I want my SplashScreen
fragment to be destroyed
. How can I do this?
I use getActivity().finish
and this finishes my app.
Asked
Active
Viewed 63 times
0
-
Does this answer your question? [How to close the current fragment by using Button like the back button?](https://stackoverflow.com/questions/20812922/how-to-close-the-current-fragment-by-using-button-like-the-back-button) – Keivan.k Aug 16 '20 at 07:36
1 Answers
0
Once you move from Splash_Screen Fragment to next fragment,Remove Your Splash_Screen Fragment form 'BACKSTACK'. So Your Splash_Screen Fragment will not open again. How this works for you.
For more information see below thread from Stack Over Flow:

SaiAbhijit
- 386
- 4
- 6
-
tanks for answer i use navigation component and i dont no how to use Backstack on navigation component – ali3529 Aug 15 '20 at 11:42