- Sometime we want to know keyboard's visibility. (When keyboard shown, change some layout or do something. etc..)
- But Android SDK doesn't have any observer.
TedKeyboardObserver
provide keyboard visibility
dependencies {
implementation 'io.github.ParkSangGwon:tedkeyboardobserver:x.y.z'
//implementation 'io.github.ParkSangGwon:tedkeyboardobserver:1.0.1'
}
If you think this library is useful, please press star button at upside.
TedKeyboardObserver
support Listener and RxJava style
- You don't need dispose this observable. When activity destroy,
TedRxKeyboardObserver
will callonComplete()
new TedRxKeyboardObserver(this)
.listen()
.subscribe(isShow -> {
// do something
}, Throwable::printStackTrace);
TedRxKeyboardObserver(this)
.listen()
.subscribe({ isShow -> // do something }
, { throwable -> throwable.printStackTrace() })
new TedKeyboardObserver(this)
.listen(isShow -> {
// do something
});
TedKeyboardObserver(this)
.listen { isShow ->
// do something
}
Copyright 2019 Ted Park
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.```