1

I have implemented inside my app a custom numerical keyboard layout (like decribed here).

It works like a charm on all devices i've tryed, but on Huawei devices behavior is very strange. Each time i press e button on my keyboard, current visible text inside textview is replaced with last pressed key (and is not append as i expected). So if i try to type "12", when i press "1" everithing is ok, when i press "2" the old char "1" is replaced with "2. What's wrong whith Huauei? I'm going to be crazy with this behavior...

giozh
  • 9,868
  • 30
  • 102
  • 183
  • You're going to need to give us a lot more data about how your numerical keyboard works. Is it an actual keyboard (an InputMethodService) or is it just an onscreen layout that acts like one? What code are you actually using to set the edit text in the second case, or to send data to the input connection in the first? – Gabe Sechan Sep 18 '18 at 14:28
  • @GabeSechan i've used the same code of posted link (https://stackoverflow.com/questions/9577304/how-to-make-an-android-custom-keyboard/45005691#45005691). – giozh Sep 18 '18 at 14:30
  • So it tries to use inputConnection without actually creating an InputMethodService? Extremely weird code. Generally you either make an actual keyboard, or you skip that and just use setText whenever they hit a button. This combo is unusual. – Gabe Sechan Sep 18 '18 at 14:40
  • Did you find any solution? I am also facing same issue. – Varun Sep 10 '20 at 09:49

0 Answers0