Skip to content
This repository was archived by the owner on Sep 1, 2025. It is now read-only.

Conversation

kosiara
Copy link

@kosiara kosiara commented Mar 3, 2015

Adds the ability to set the desired width of the Snackbar on tablets. The maximum width of the message was set to
568dp in dimens.xml which was too narrow for me. I wanted to have a full-width message on the bottom of the tablet's screen.

Sample usage is:
Snackbar.with(getApplicationContext())
.text("Message text")
.maxWidthPercentage(0.95f)
.show(this);

Adds the ability to set the desired width of the Snackbar on tablets. The maximum width of the message was set to
<dimen name="sb__max_width">568dp</dimen> in dimens.xml which was too narrow for me. I wanted to have a full-width message on the bottom of the tablet's screen.

Sample usage is:
Snackbar.with(getApplicationContext())
      .text("Message text")
      .maxWidthPercentage(0.95f)
      .show(this);
wmora added a commit that referenced this pull request Mar 6, 2015
…support

.maxWidthPercentage(float width) method
@wmora wmora merged commit 03c6df6 into nispok:master Mar 6, 2015
@wmora wmora added this to the 2.10.2 milestone Mar 7, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants