Home > database >  Android, Kotlin: How to close BottomSheetDialogFragment after activity is closed without using Navig
Android, Kotlin: How to close BottomSheetDialogFragment after activity is closed without using Navig

Time:11-30

Background: In my application, I have a Fragment (A) which contains a list of Accounts. When any Account is clicked, a BottomSheetDialogFragment (B) opens, where you can see a list of options. If Edit option clicked, a new Activity (C) opens.

A

V

C

My issues is: when the last Activity (C) is closed, I'm navigated back to the BottomSheetDialogFragment (B) instead of Fragment (A). How can I go from (C) to (A), when (C) is closed, without using Navigation Component?

CodePudding user response:

When edit option is clicked you can call dismiss method of BottomSheetDialogFragment to finish the dialog.

  • Related