开发者

Blackberry - Find out if spell check suggestions dialog is showed

开发者 https://www.devze.com 2023-02-14 13:08 出处:网络
Have you any idea how to find out if spell check suggestions dialog is showed? I开发者_运维百科 have tried to simple test

Have you any idea how to find out if spell check suggestions dialog is showed?

I开发者_运维百科 have tried to simple test

getScreen().isFocuse()

If spell check is called from input field context menu, this works well and returns false.

However if spell check is called by long press of trackball after typing, this code still returns true.

Can you help me?

Thank you!


Looks like there is no way of controlling in-line spell checking (besides disabling it at all). As a workaround, you can start spell checking from code (e.g. before closing a screen):

  1. Make sure the field's style has no Field.NON_SPELLCHECKABLE style set.
  2. Create spell checking UI: SpellCheckEngineFactory.createSpellCheckUI().
  3. Pass your implementation of AbstractSpellCheckUIListener to SpellCheckUI.addSpellCheckUIListener(): now you can control spell checking.
  4. Run spell checking for the specified field: SpellCheckUI.spellCheck(field).

Voilà!

PS
Spell checking?!! Spell checking!

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号