yshrsmz / KeyboardVisibilityEvent

Android Library to handle software keyboard visibility change event.
Apache License 2.0
1.74k stars 171 forks source link

Readme needs Update: getLifecycleOwner(), is not an argument for setEventListener #60

Closed Morteza-Rastgoo closed 4 years ago

Morteza-Rastgoo commented 4 years ago

As Described in the Readme:

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

LifeCycleOwner is not an option in the method. Can you please explain why it is removed?

yshrsmz commented 4 years ago

https://github.com/yshrsmz/KeyboardVisibilityEvent/blob/ad77fb4b860773ade6bf2c874f20b5eb3216317e/keyboardvisibilityevent/src/main/java/net/yslibrary/android/keyboardvisibilityevent/KeyboardVisibilityEvent.kt#L33-L47

Which version are you using? Please use 3.0.0-RC2

Morteza-Rastgoo commented 4 years ago

It was 2.3.0 Let me try 3.0.0-RC2.

Morteza-Rastgoo commented 4 years ago

Thanks this is fine with the 3.0.0-RC2.

yshrsmz commented 4 years ago

Thanks for the confirmation!

Maybe I should release 3.0.0.

Morteza-Rastgoo commented 4 years ago

Sounds Good.

Morteza-Rastgoo commented 4 years ago

Can I ask an Irrelevant question? In a Fragment, I have 4 editTexts which I don't want to get Automatic focus when page opens or onResume In One Of the editTexts. The only working solution to avoid keyboard opening onResume is to use this library and close the keyboard if focus is on one of editTexts that I don't want to get keyboard opened. Is there any other solution to this?