'how to check if there is a FragmentDialog on top of the current activity/fragment

this question is alike the following question-

https://stackoverflow.com/questions/21352571/android-how-do-i-check-if-dialogfragment-is-showing#:~:text=Use%20%7B%20progressDialog.&text=showDialog()%20twice%20back%2Dto,is%20actually%20added%20by%20system.

but it did not answer my question so therefor my thread.

I'm currently working on an android application that can trigger dialog for alot of reasons and I want to check if there is -any- dialog that is alive/showing.

is it possible?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source