What I set out to do. Build the core of the keyboard: a full Russian ЙЦУКЕН layout that doesn’t just type letters, but fixes fat-finger typos as you go. The whole reason for this project is that Samsung’s Russian autocorrect is rough, so this part had to genuinely work, not just look the part.
Drew the keyboard as a custom Canvas view instead of a UI framework, so it stays small and opens fast on old phones. Then wrote the autocorrect engine - it treats every tap as a point on the screen, not a fixed key, and runs a search over a word dictionary that scores how well your taps match each word against how common that word is. On space it decides whether to swap your typo for the best match. Never touch a word that’s already spelled right.
At first the system said the keyboard was visible, the process was running, no crash in the logs, just a thin blank strip at the bottom. I lost a good while on this. Turned out Android measures the keyboard once with a width of zero before the real layout pass, and I was computing the keyboard’s height from its width, so zero width meant zero height and it never recovered. Fixed it by falling back to the actual screen width when the measured width comes back as zero. Keyboard popped straight up after that.
(to be honest there are still problems with this system which i aim to soon fix, like for example starting mid word, or not spaced word. But at least I was able to get it to work in the most ideal conditions)
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.