Add new snackbar features to prepare for omnibox geolocation snackbar.
This adds a few new features to snackbars to prepare for the geolocation
disclosure snackbar:
- Snackbars now interact nicely with the keyboard. Snackbars won't
overlap the keyboard; instead, they're appear above the keyboard if
the keyboard is showing, and will drop down the bottom of the screen
when the keyboard is hidden. This is achieved using
View.getWindowVisibleDisplayFrame() to find where the keyboard is
showing.
- Snackbars now support multiline text. In this case, the snackbar text
won't be ellipsized and TemplatePreservingTextView will act like a
normal TextView.
- Snackbar text can now be any CharSequence, not just a String. This
will be used to display snackbars that contain spans.
Implementation change: this adds a Snackbar class, which allows greater
flexibility when configuring snackbars. SnackbarManager.showSnackbar()
now acceps a single Snackbar, instead of a long list of parameters.
BUG=505481
Review URL: https://codereview.chromium.org/
1229733002
Cr-Commit-Position: refs/heads/master@{#337966}