How do you implement the snackbar that has the button at the bottom?

Viewed 11009

On the material design specs there is a snackbar that has the button at the bottom. How do you implement that?

Here is the image from the spec. I'm talking about the last one. enter image description here

3 Answers

The answer on this link helped me to solve the issue.

https://stackoverflow.com/a/54177574/869451

I'm going to copy the solution here in case the link is gone:

        <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
            <item name="colorPrimary">@color/colorPrimary</item>
            <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
            <item name="colorAccent">@color/colorAccent</item>
            <!-- Add this line -->
            <item name="maxActionInlineWidth">@dimen/design_snackbar_action_inline_max_width</item>
        </style>
Related