Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
class BottomSheetSetStateAction(
@BottomSheetBehavior.State private val desiredState: Int
) : ViewAction {
override fun getConstraints(): Matcher<View> {
return Matchers.any(View::class.java)
}
override fun perform(uiController: UiController, view: View) {
val bottomSheetBehavior = BottomSheetBehavior.from(view)
bottomSheetBehavior.state = desiredState
}
override fun getDescription(): String = "Set BottomSheet to state: $desiredState"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment