Skip to content

Android Library to handle soft keyboard visibility change event.

Notifications You must be signed in to change notification settings

fritexvz/KeyboardVisibilityEvent

 
 

Repository files navigation

KeyboardVisibilityEvent

Android Arsenal Android Gems

Android Library to handle soft keyboard visibility change event. show/hide keyboard method is also included.

Library's status

Currently I don't have enough time to maintain this library, so I leave this as it is.
I'm going to merge PRs when they arrive though ;)

Features

  • 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).

Installation

AAR is distributed on the Maven Central repository.

repositories {
    mavenCentral()
}

dependencies {
    compile 'net.yslibrary.keyboardvisibilityevent:keyboardvisibilityevent:1.0.1'
}

Usage

check out sample project!

Add event listener for keyboard change event

KeyboardVisibilityEvent.setEventListener(
        getActivity(),
        new KeyboardVisibilityEventListener() {
            @Override
            public void onVisibilityChanged(boolean isOpen) {
                // some code depending on keyboard visiblity status
            }
        });

License

http://www.apache.org/licenses/LICENSE-2.0.txt

About

Android Library to handle soft keyboard visibility change event.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%