What is the difference between BottomDialogSheet and Backdrop in Android?

I am confused and want to know What is the difference between BottomDialogSheet and Backdrop in Android?

Both appear from bottom and are swipable. Then what is the difference between both?


Solution 1:

A backdrop appears behind all other surfaces or views

Backdrop is used in a different way as explain here

Main differences between Sheets and backdrop are

  • In a way backdrop makes out app looks like it is working inside a sheet
  • We interact with the backdrop to change menus, filter data, etc.
  • Sheets have default elevation of 8dp or 16dp whereas views in front of Backdrop have default elevation of 0dp or 1dp
  • Backdrop is mostly used as the main container whereas dialogSheets are used as optional or showing additional options

Please keep free to edit and add more differences or example in my answer