Skip to content

Commit 2cb77c9

Browse files
committed
Update Snackbar documentation to include LENGTH_INDEFINITE
PiperOrigin-RevId: 203952007
1 parent 662aa06 commit 2cb77c9

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

lib/java/com/google/android/material/snackbar/BaseTransientBottomBar.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,8 +302,8 @@ protected boolean hasSnackbarStyleAttr() {
302302
/**
303303
* Set how long to show the view for.
304304
*
305-
* @param duration either be one of the predefined lengths: {@link #LENGTH_SHORT}, {@link
306-
* #LENGTH_LONG}, or a custom duration in milliseconds.
305+
* @param duration How long to display the message. Can be {@link #LENGTH_SHORT}, {@link
306+
* #LENGTH_LONG}, {@link #LENGTH_INDEFINITE}, or a custom duration in milliseconds.
307307
*/
308308
@NonNull
309309
public B setDuration(@Duration int duration) {

lib/java/com/google/android/material/snackbar/Snackbar.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@ public boolean isShown() {
163163
*
164164
* @param view The view to find a parent from.
165165
* @param text The text to show. Can be formatted text.
166-
* @param duration How long to display the message. Either {@link #LENGTH_SHORT} or {@link
167-
* #LENGTH_LONG}
166+
* @param duration How long to display the message. Can be {@link #LENGTH_SHORT}, {@link
167+
* #LENGTH_LONG}, {@link #LENGTH_INDEFINITE}, or a custom duration in milliseconds.
168168
*/
169169
@NonNull
170170
public static Snackbar make(
@@ -204,8 +204,8 @@ public static Snackbar make(
204204
*
205205
* @param view The view to find a parent from.
206206
* @param resId The resource id of the string resource to use. Can be formatted text.
207-
* @param duration How long to display the message. Either {@link #LENGTH_SHORT} or {@link
208-
* #LENGTH_LONG}
207+
* @param duration How long to display the message. Can be {@link #LENGTH_SHORT}, {@link
208+
* #LENGTH_LONG}, {@link #LENGTH_INDEFINITE}, or a custom duration in milliseconds.
209209
*/
210210
@NonNull
211211
public static Snackbar make(@NonNull View view, @StringRes int resId, @Duration int duration) {

0 commit comments

Comments
 (0)