-
Notifications
You must be signed in to change notification settings - Fork 734
Allow setting windowSoftInputMode #1462
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
if (mIsShown) { | ||
Window window = getWindow(); | ||
if (window != null) { | ||
window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe extract this functionality to a separate method since it pretty much returns itself
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean the setKeyboardOverlayMode
and the clearKeyboardOverlayMode
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, they are very similar, don't you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ping
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do think so, I usually try to minimize changes in these files; done.
Just to be sure it's not missed, there is a small risk in this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the risk?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have a few Activities
that have a different windowSoftInputMode
than adjustResize
they might look different if this bug has indeed overridden their selection.
I can send you the details in DM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ethanshar, do we want to talk about this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should (:
Can you write this down and raise it in the next sprint meeting
Description
Currently our
CustomKeyboardLayout
is forcing the app to havewindowSoftInputMode=SOFT_INPUT_ADJUST_RESIZE
even if you did not use aKeyboardAccessoryView
in your app.This fix changes this behaviour to only occur if a
KeyboardAccessoryView
is loaded (even in a different tab etc).@ethanshar, I've tested on both public and private demo apps, but I think it isn't without risk, what's your opinion?
Changelog
Do not force SOFT_INPUT_ADJUST_RESIZE on Android apps.
Fixes #1360