feat(TouchController): add IME padding support#279
Conversation
|
I believe I am already partially doing this with #278? Is it possible to rebase your implementation on that so we can have both touchcontroller and non-touchcontroller keyboards have the animation? Am worried about conflicts |
Ok, will rebase |
|
Rebased. All keyboards use same animation now |
|
I want to refactor the logic to make the animation better by not using plain getInterpolatedFraction. Will mark as ready after the refactor |
| @Override | ||
| public void onKeyboardPanningChanged() { | ||
| if (LauncherPreferences.PREF_KEYBOARD_PANNING) { | ||
| getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN); |
There was a problem hiding this comment.
My commit may still conflict with your logic as it uses pan rather than resize. I'll test and fix this once you're done with your part. Just leaving a note here so it isn't forgotten.
There was a problem hiding this comment.
I use android:windowSoftInputMode="adjustResize" for all cases, so there is no need to use setSoftInputMode here.
The reason why I do this is you can use window insets animation only when softInputMode is set to adjustResize.
There was a problem hiding this comment.
SOFT_INPUT_ADJUST_PAN doesn't provide seamless animation either. The best way to handle it is using WindowInsets API.
There was a problem hiding this comment.
Yeah, I wasn't familiar with this, you're doing a far better job at it than me, thanks!
I used setSoftInputMode to be able to toggle the animation on and off in case anyone wanted the old behavior.
Add support for IME animation for input boxes in TouchController.
Also add KEYBOARD_SHOW capability in proxy client, so it is possible to click the input box to show the soft keyboard when users close soft keyboard manually.
Fixed return value performEditorAction and performPrivateCommand, they should be true unless InputConnection is not valid.
Fixed the timing of initial touchControllerInputView.setSize call, because it is called with zero before.
Set disableFullScreenInput to true, as most users don't want full screen(extracted) input.
I modified MainActivity a lot and may break things, so please review and test it extensively.