Open jahorton opened 2 weeks ago
- Only 1 call to
setBannerHeight
, right here.
"Here" being:
This was part of KMKeyboard.onConfigurationChanged
before #11722, which spins it off into onSizeChanged
, which does (also) override an existing built-in View
method. ("Also" because onConfigurationChanged
does too.)
- 4 calls to
setOskHeight
setBannerHeight
KMKeyboard.onResume
, as noted in the description
onSizeChanged
should trigger after the setLayoutParams
calls go through. (There may be a need to invalidate()
-> requestLayout()
in order to flush the changes.)
- 2 calls to
setOskWidth
setBannerHeight
KMKeyboard.onResume
, as noted in the descriptionI feel as if onResume
is always paired with an onConfigurationChanged
call. If it's possible to determine this to be true by investigation, we can probably drop onResume
entirely in favor of onConfigurationChanged
, passing all keyboard-dimension synchronization through the single code block seen under setBannerHeight
's entry above.
If I'm wrong about that, worst-case, we can probably just .setLayoutParams
to trigger a relayout, then use onSizeChanged
from #11722 to set the dimensions - also from a single, central location.
Originally posted by @mcdurdin in https://github.com/keymanapp/keyman/pull/11722#pullrequestreview-2103479072
_Originally posted by @mcdurdin in https://github.com/keymanapp/keyman/pull/11722#discussion_r1630512393_