By definition, Scoped functions are functions that execute a block of code within the…
Popupwindow is a floating view that is displayed on top of an activity. Android provides a…