Android Library to handle soft keyboard visibility change event. show/hide keyboard method is also included.
- handle keyboard visibility change
- check if keyboard is currently visible
- show/hide keyboard(check UIUtil.java)
Please note that as described in this issue, currently the library cannot detect visibility change when the activity's windowSoftInputMode
do not change Activity's height(such as adjustNothing
).
AAR is distributed on the Maven Central repository.
repositories {
mavenCentral()
}
dependencies {
compile 'net.yslibrary.keyboardvisibilityevent:keyboardvisibilityevent:1.0.0'
}
check out sample project!
KeyboardVisibilityEvent.setEventListener(
getActivity(),
new KeyboardVisibilityEventListener() {
@Override
public void onVisibilityChanged(boolean isOpen) {
// some code depending on keyboard visiblity status
}
});