Bump floret-kit, check the fake keyboard lands in the test (#177)
This commit is contained in:
1 parent
d8b64fb3e1
commit
acf482246b
2 files changed
+7
-5
No files matched your search
@@ -58,18 +58,20 @@ class ImeInsetsResyncTest {
|
||||
}
|
||||
|
||||
private fun runUserDrivenKeyboardAnimation() {
|
||||
val ime = WindowInsets.Type.ime()
|
||||
val animation = WindowInsetsAnimation(ime, null, -1)
|
||||
val keyboard = Insets.of(0, 0, 0, KEYBOARD_PX)
|
||||
rule.runOnUiThread {
|
||||
val root = view.rootView
|
||||
val ime = WindowInsets.Type.ime()
|
||||
val animation = WindowInsetsAnimation(ime, null, -1)
|
||||
val keyboard = Insets.of(0, 0, 0, KEYBOARD_PX)
|
||||
val midway = WindowInsets.Builder().setInsets(ime, keyboard).setVisible(ime, true).build()
|
||||
root.dispatchWindowInsetsAnimationPrepare(animation)
|
||||
root.dispatchWindowInsetsAnimationStart(animation, WindowInsetsAnimation.Bounds(Insets.NONE, keyboard))
|
||||
root.dispatchWindowInsetsAnimationProgress(midway, listOf(animation))
|
||||
root.dispatchWindowInsetsAnimationEnd(animation)
|
||||
}
|
||||
rule.waitForIdle()
|
||||
assertThat(imeBottom).isEqualTo(KEYBOARD_PX)
|
||||
rule.runOnUiThread { view.rootView.dispatchWindowInsetsAnimationEnd(animation) }
|
||||
rule.waitForIdle()
|
||||
}
|
||||
|
||||
private companion object {
|
||||
|
||||
+1
-1
Submodule floret-kit updated: b6ca2d3e6e...2e0fbeae26.
Reference in new issue
Block a user