Added additional capibilities#3
Open
NateZ7 wants to merge 3 commits into
Open
Conversation
ravindu1024
reviewed
Jun 3, 2018
| private SoftKeyboardToggleListener mCallback; | ||
| private View mRootView; | ||
| private Boolean prevValue = null; | ||
| public static Boolean sPrevValue = null; |
Owner
There was a problem hiding this comment.
Hi, why does this have to be public and static? This should not be accessed from outside.
ravindu1024
reviewed
Jun 4, 2018
| } | ||
| } | ||
|
|
||
| /** |
Owner
There was a problem hiding this comment.
I don't think we can do it this way. What if there are multiple listeners? We don't want to share the same static variable that tracks the previous value for all of them, do we? I think the better way of doing this, would be to return a handle to the KeyBoardUtils object when adding the listener and then calling a non-static method on that object to get the current value.
Owner
|
Hi Nate,
Thanks for using it! Glad it helped someone.
I appreciate the improvements you suggested but made some comments on your
commits. Take a look. I think it might be useful for your fork as well.
Thanks and regards,
Ravindu
…On Sun., 3 Jun. 2018, 11:21 pm NateZ7, ***@***.***> wrote:
Hi, great library. Added a few things that will help me use the library
directly.
Thanks alot !
------------------------------
You can view, comment on, or merge this pull request online at:
#3
Commit Summary
- Added option to know visibility of keyboard
- Added option to open and close soft keyboard
- Added option to force close keyboard using activity
File Changes
- *M*
keyboard-listener/src/main/java/com/rw/keyboardlistener/KeyboardUtils.java
<https://github.com/ravindu1024/android-keyboardlistener/pull/3/files#diff-0>
(44)
Patch Links:
- https://github.com/ravindu1024/android-keyboardlistener/pull/3.patch
- https://github.com/ravindu1024/android-keyboardlistener/pull/3.diff
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#3>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AKeGOKLkw_fvJ3CS5IRgFkV41cjh3O7pks5t4-LZgaJpZM4UYFJX>
.
|
ravindu1024
reviewed
Jun 4, 2018
| */ | ||
| public static void openSoftKeyboard(Context context) { | ||
| InputMethodManager imm = (InputMethodManager)context.getSystemService(Context.INPUT_METHOD_SERVICE); | ||
| imm.toggleSoftInput(0, InputMethodManager.SHOW_IMPLICIT); |
Owner
There was a problem hiding this comment.
Why are we not using "InputhMethodManager.showSoftInput(View, int) ?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi, great library. Added a few things that will help me use the library directly.
Thanks alot !