Android - Snackbar vs Toast - usage and difference

前端 未结 9 1991
温柔的废话
温柔的废话 2020-12-08 03:28

We have been using just Toasts in our application so far and as we are planning to adopt some new features from Support Design Library I am wondering what\'s the recommended

9条回答
  •  半阙折子戏
    2020-12-08 04:04

    Google's Material Design Specification says that it's ok to have a Snackbar without an action. They have provided examples of what a Snackbar should look like if it only displays a single String. I would assume that "System Messaging" means device events like network connection being lost - whereas archiving an email is a Gmail specific action, for example.

    For consistency's sake, it makes sense to pick either a Toast or a Snackbar, and apply that throughout your app.

提交回复
热议问题