Snackbar with Action Button not aligned to text

Asked

Viewed 349 times

2

Hello,

I wonder why my Snackbar doesn’t get the text aligned with the ActionButton, this happens only when the text is too long. I am placing an example image. Do you know how I make Snackbar to get its content aligned correctly? If I search "Android Snackbar" in Google Images, I see several examples where there is a text of two lines ActionButton is aligned correctly with the text, and not below, as in the photo.

SnackBar desalinhado

  • 1

    Indeed, there are several examples, but in the examples the amount of large text is in the description and not in the text of the button, I believe that is the problem. Action button text must be fixed size and without line break. Test.

  • Genius are you? Rsrsrsrsrs. Damn that simple question but it seems I would never think of it myself. Thank you very much. Replace "Try Again" with "Retry" and I increased the other text. Tcharan, this is the solution. Only now comes the doubt, which text can I replace in place of "Try again" to represent the same thing in Portuguese with few letters?

  • Another thing, could you put your comment as an answer, so I close the question? Could you also answer in SOE? The link to my question there is this: http://stackoverflow.com/questions/33769867/snack-bar-with-action-button-not-aligned-to-the-text

1 answer

2


Indeed, there are several examples, but in the examples the amount of large text is in the description and not in the text of the button, I believe that is the problem. Action button text must have fixed size and no line break.

Increase the description text and decrease the text of the button action.

An alternative to the action button text would be: Reload.

Or, you can search how to add an icon in Snackbar and try to use it as a button, I know it is possible.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.