mirror of
https://github.com/material-components/material-components-android.git
synced 2026-02-20 08:39:55 +08:00
Instead of artifical timeouts and race condition in waiting for snackbar's dismissal in a loop, use Espresso's IdlingResource to reliably wait until the snackbar has been shown or dismissed. Also align the API surface of snackbar's callbacks with DrawerLayout's listeners, allowing registering more than one callback, and removing registered callbacks. Bug: 32022732 Test: ./gradlew support-design:connectedCheck --info --daemon -Pandroid.testInstrumentationRunnerArguments.class=android.support.design.widget.CustomSnackbarTest Test: ./gradlew support-design:connectedCheck --info --daemon -Pandroid.testInstrumentationRunnerArguments.class=android.support.design.widget.SnackbarTest Change-Id: If8f8415b6453d75cb24a022b2d7d676f7649542c GitOrigin-RevId=8c153ac8980737c4292ae1c019c69471607b3859 PiperOrigin-RevId: 141502000