Can I display material design Snackbar in dialog?

后端 未结 4 1776
隐瞒了意图╮
隐瞒了意图╮ 2021-01-17 12:24

I am developing an android application. In that I want to display material design Snackbar in dialog. Is it possible? If yes then how?

Please help me.

Thanks

4条回答
  •  無奈伤痛
    2021-01-17 12:33

    Yes, you can.

    To show Snackbar inside your Dialog create custom View for it. You can read more about it here: Dialogs/Creating a Custom Layout

    Then for showing Snackbar invoke Snackbar.make((dialogView, "text", duration)) where dialogView is your custom view.

提交回复
热议问题