I need popup window to show my user's options for example, I was wondering to add a long press botton and then when that button clicked, show a popup window with transparent background and when outside clicked close popup window
I have tried so many ways but non of them worked for me.
I have no clue how to use dialog window too.
No matter which one to use, dilog fragment or popup window but I need that my window to be like this(on the top is user name which has given from data base and then options)
here is where should I place popup window:
val mUserAdapter = UserAdapter()
mUserAdapter.setOnclickListener(AdapterListener({
if (it != 0L)
this.findNavController().navigate(
UserListFragmentDirections.actionUserListFragmentToIncreaseMoneyFragment(it)
)
Log.d("TAG", "navTeat $it ")
}, {
deleteDialog(it)
}
) {
Toast.makeText(activity, "Long", Toast.LENGTH_SHORT).show() //Here instead of Toast, I need POPUP WINDOW
})
THANKS :)