Android Custom Dialog Example

Dependency

Add it to your style.xml

Add them to drawable folder Rectangle Shape

  Circle Shape

    Top middle circle dialog view

Using Constraing Layout

Input Dialog with top end cancel button  

  Initialize from activity or fragment using these below code