Umang17 / softkeyboard

Automatically exported from code.google.com/p/softkeyboard
0 stars 0 forks source link

Keyboard redraws itself on every key press in landscape(Bulgarian Phonetic and BDS) #305

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. change the keyboard to Bulgarian Phonetic or BDS
2. open hardware keyboard or rotate to landscape
3. write in a field

What is the expected output? What do you see instead?
The sequences don't work, I get "сх" instead of "ш"

What version of the product are you using? On what operating system?
Vesrsion 20100119-imaginary (release 15) on G1 with CyanogenMod 4.2.15.1

Please provide any additional information below:
Note: If you think this is a device related issue, include the report
output from the Device Information application (http://softkeyboard.googlec
ode.com/svn/DeviceInformationDisplay/bin/DeviceInformationDisplay.apk)
Note: If you encountered an application error, include the logcat report
which can be retrieved from the LogCollector (http://android-log-
collector.googlecode.com/files/android-log-collector-1.0.0.apk)

In logcat everytime I press a key I get: 

W/AnySoftKeyboard( 1289): NOTE: The returned keyboard has the wrong width!
Keyboard width: 484, device width:480
D/AnySoftKeyboard( 1289): Alphabet keyboard width is 484, while view width
is 480. Recreating.
D/AnySoftKeyboard( 1289): About to create keyboard: bg_ph_keyboard
D/AnySoftKeyboard( 1289): Starting parsing AnySoftKeyboardMetaData
D/AnySoftKeyboard( 1289): Finished parsing AnySoftKeyboardMetaData
D/AnySoftKeyboard( 1289): loadKeyboard result: PrefString:bg_ph_keyboard
KeyboardName:Българска Фонетична IconResId:2130837508
DefaultDictionaryLanguage:Bulgarian
I/AnySoftKeyboard( 1289): Done creating keyboard: Българска 
Фонетична,
which is LTR:true
W/AnySoftKeyboard( 1289): NOTE: The returned keyboard has the wrong width!
Keyboard width: 484, device width:480
D/AnySoftKeyboard( 1289): Alphabet keyboard width is 484, while view width
is 480. Recreating.
D/AnySoftKeyboard( 1289): About to create keyboard: bg_ph_keyboard
D/AnySoftKeyboard( 1289): Starting parsing AnySoftKeyboardMetaData
D/AnySoftKeyboard( 1289): Finished parsing AnySoftKeyboardMetaData
D/AnySoftKeyboard( 1289): loadKeyboard result: PrefString:bg_ph_keyboard
KeyboardName:Българска Фонетична IconResId:2130837508
DefaultDictionaryLanguage:Bulgarian
I/AnySoftKeyboard( 1289): Done creating keyboard: Българска 
Фонетична,
which is LTR:true
W/AnySoftKeyboard( 1289): NOTE: The returned keyboard has the wrong width!
Keyboard width: 484, device width:480
D/AnySoftKeyboard( 1289): Alphabet keyboard width is 484, while view width
is 480. Recreating.
D/AnySoftKeyboard( 1289): About to create keyboard: bg_ph_keyboard
D/AnySoftKeyboard( 1289): Starting parsing AnySoftKeyboardMetaData
D/AnySoftKeyboard( 1289): Finished parsing AnySoftKeyboardMetaData
D/AnySoftKeyboard( 1289): loadKeyboard result: PrefString:bg_ph_keyboard
KeyboardName:Българска Фонетична IconResId:2130837508
DefaultDictionaryLanguage:Bulgarian
I/AnySoftKeyboard( 1289): Done creating keyboard: Българска 
Фонетична,
which is LTR:true
W/AnySoftKeyboard( 1289): NOTE: The returned keyboard has the wrong width!
Keyboard width: 484, device width:480
D/AnySoftKeyboard( 1289): Alphabet keyboard width is 484, while view width
is 480. Recreating.
D/AnySoftKeyboard( 1289): About to create keyboard: bg_ph_keyboard
D/AnySoftKeyboard( 1289): Starting parsing AnySoftKeyboardMetaData
D/AnySoftKeyboard( 1289): Finished parsing AnySoftKeyboardMetaData
D/AnySoftKeyboard( 1289): loadKeyboard result: PrefString:bg_ph_keyboard
KeyboardName:Българска Фонетична IconResId:2130837508
DefaultDictionaryLanguage:Bulgarian
I/AnySoftKeyboard( 1289): Done creating keyboard: Българска 
Фонетична,
which is LTR:true
W/AnySoftKeyboard( 1289): NOTE: The returned keyboard has the wrong width!
Keyboard width: 484, device width:480
D/AnySoftKeyboard( 1289): Alphabet keyboard width is 484, while view width
is 480. Recreating.
D/AnySoftKeyboard( 1289): About to create keyboard: bg_ph_keyboard
D/AnySoftKeyboard( 1289): Starting parsing AnySoftKeyboardMetaData
D/AnySoftKeyboard( 1289): Finished parsing AnySoftKeyboardMetaData
D/AnySoftKeyboard( 1289): loadKeyboard result: PrefString:bg_ph_keyboard
KeyboardName:Българска Фонетична IconResId:2130837508
DefaultDictionaryLanguage:Bulgarian
I/AnySoftKeyboard( 1289): Done creating keyboard: Българска 
Фонетична,
which is LTR:true
W/AnySoftKeyboard( 1289): NOTE: The returned keyboard has the wrong width!
Keyboard width: 484, device width:480

both with the harware keyboard and on-screen keyboard, both with fullscreen
option turned on and off

Original issue reported on code.google.com by telemaniaka on 17 Mar 2010 at 3:10

GoogleCodeExporter commented 9 years ago
successfully recreated on Version:20100314-x-dvtel-testers (release 16)  

Original comment by telemaniaka on 17 Mar 2010 at 3:35

GoogleCodeExporter commented 9 years ago
Possible fix. 
Its my first time working with java or android so there is probably a better 
way to
fix it.

Original comment by telemaniaka on 18 Mar 2010 at 8:33

Attachments:

GoogleCodeExporter commented 9 years ago
I don't like your suggestion.
But I think I know what is the problem, so I'll fix it for the next release.

Original comment by menn...@gmail.com on 18 Mar 2010 at 8:40

GoogleCodeExporter commented 9 years ago
yea, I just saw how many things I broke >.< 
sorry 

Original comment by telemaniaka on 18 Mar 2010 at 9:08

GoogleCodeExporter commented 9 years ago
Have you checked-out the SVN, and tried your fix?

Original comment by menn...@gmail.com on 18 Mar 2010 at 9:16

GoogleCodeExporter commented 9 years ago
Yes, but I didn't test enough.

Trying different things now but I won't be able to come up with a nice 
solution, the
code is still a big mystery to me. Its a really interesting learning experience 
^__^

Original comment by telemaniaka on 18 Mar 2010 at 9:41

GoogleCodeExporter commented 9 years ago
I can point you to where is the problem (two places), and you can try to fix it 
yourself:
1) the keyboard XML (under "/trunk/project/res/xml/bg_bds_qwerty.xml" and
bg_ph_qwerty.xml) is not sized correctly. 
In each Row not, there is the size of the key (<Row android:keyWidth="9.09%p">) 
in
percents. My guess is that it is not precise enough, try to play with the 
values.
2) at the line you tried fix, the real fix should be adding tolerances: instead 
of
checking that the widths are exactly the same, they should be up to +-5 pixels 
away.

Want to try and tell me if it works? And if so, we can add your patch

Original comment by menn...@gmail.com on 18 Mar 2010 at 10:32

GoogleCodeExporter commented 9 years ago
Hah, I was thinking that the two options for fixing it are:
1) fix the additional 4 pixels, but reached "this.height" in AnyKeyboard.java 
and
didn't know where to look after that

2) if the hardware keyboard is out, don't care if the keyboard is bigger cause 
we
don't show it anyway, but couldn't find how to know when the keyboard is out

My first fix was that. Took "keyboard instanceof HardKeyboardTranslator" from
isCurrentKeyboardPhysical() but apparently that broke redrawing on orientation 
change
in general

So in the end I gave up and made it with margins till it gets fixed officially 
XD

Resource files fixes:

Original comment by telemaniaka on 18 Mar 2010 at 11:23

Attachments:

GoogleCodeExporter commented 9 years ago
OK.
I'll fix that too

Original comment by menn...@gmail.com on 18 Mar 2010 at 11:26

GoogleCodeExporter commented 9 years ago
Try the latest:
http://softkeyboard.googlecode.com/files/AnySoftKeyboard_20100318.apk

Original comment by menn...@gmail.com on 18 Mar 2010 at 6:39

GoogleCodeExporter commented 9 years ago
yes, its working now

Original comment by telemaniaka on 19 Mar 2010 at 11:38

GoogleCodeExporter commented 9 years ago
Good.
Which device do you have?

Original comment by menn...@gmail.com on 19 Mar 2010 at 12:20

GoogleCodeExporter commented 9 years ago
HTC G1 with CyanogenMod 4.2.15.1

Original comment by telemaniaka on 19 Mar 2010 at 2:59

GoogleCodeExporter commented 9 years ago
OK.
Can I use you for some beta-testing? I'm changing the physical keyboard 
translation
infrastructure.

Original comment by menn...@gmail.com on 19 Mar 2010 at 3:54