I have used Dialog for display ad in my Andorid app.But I have to display this Dialog about 50dp top from buttom so i think we should set Dia
Dialog
Dia
Well, what best worked for me was to wrap my dialog view inside a FrameLayout and add padding, and set onClickListener to "dismiss" dialog. Like this:
dialog?.window?.setBackgroundDrawable(context?.getDrawable(android.R.color.transparent)) view.parentFl.setOnClickListener { dismiss() }