Code example for InputMethodManager

Methods: hideSoftInputFromWindow, showSoftInput

0
 
  @Test 
  public void shouldRecordSoftInputVisibility() { 
    assertThat(shadow.isSoftInputVisible()).isFalse();
 
    manager.showSoftInput(null, 0);
    assertThat(shadow.isSoftInputVisible()).isTrue();
 
    manager.hideSoftInputFromWindow(null, 0);
    assertThat(shadow.isSoftInputVisible()).isFalse();
  } 
}