Skip to content

Instantly share code, notes, and snippets.

Last active May 24, 2021 23:33
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
IdlingResource which waits for a BottomSheet to enter a particular state.
class BottomSheetStateResource(
bottomSheetBehavior: BottomSheetBehavior<View>,
@BottomSheetBehavior.State private val desiredState: Int
) : BottomSheetResource(bottomSheetBehavior) {
override fun getName(): String {
return "BottomSheet awaiting state: $desiredState"
override fun isDesiredState(@BottomSheetBehavior.State state: Int): Boolean {
return state == desiredState
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment