6

I am playing with the Demo SoftKeyboard the comes with the Android SDK.

In portrait mode when the candidate view is shown, it doesn't move the app up as the default android keyboard does. Hence it covers part of the application view.

What should be changed in order to make the candidate view in the demo softkeyboard behave as the default android keyboard does?

I've also looked at the source of the android keyboard from git but found nothing related to this behavior.

  • What is the class of your root View and what are the LayoutParams for that view. – drawnonward May 04 '10 at 02:49
  • It's the android's KeyboardView I think. The Candidate view is created through the callback method onCreateCandidatesView() of InputMethodService class. How is it being layout I have no idea. –  May 07 '10 at 08:52
  • I answered a similar question here http://stackoverflow.com/questions/11840627/rejusting-ui-with-candidateview-visible-in-custom-keyboard/ – tilish Mar 18 '14 at 20:16

1 Answers1

7

I know this is old but here is an answer anyway.

 @Override public void onComputeInsets(InputMethodService.Insets outInsets) {
    super.onComputeInsets(outInsets);
    if (!isFullscreenMode()) {
        outInsets.contentTopInsets = outInsets.visibleTopInsets;
    }
}
Vincent Williams
  • 2,836
  • 3
  • 17
  • 22