LatinIME container height too small

41 views
Skip to first unread message

Joerie

unread,
Dec 27, 2010, 10:12:48 AM12/27/10
to android-porting
Hi,

I'm having some trouble with the (revamped) LatinIME keyboard on 2.3 -
it's height is somehow incorrect. In both portrait and landscape mode,
it displays at roughly 1/5th of the screen height (whereas I'd expect
it to be ~50%). The width is fine, spanning the full width of either
portait or landscape mode.

- The Japanese IME displays fine, which - I suppose - isolates the
issue to being somewhere in the LatinIME
- My screen size is 480x800, and I've set ro.sf.lcd_density
accordingly (240).

Has anyone got an idea where I should start looking?

Joerie

Joerie de Gram

unread,
Jul 14, 2011, 7:11:26 AM7/14/11
to android-porting
Hi,

Just replying to myself to provide a solution to a months-old problem
(for Googlability).

> I'm having some trouble with the (revamped) LatinIME keyboard on 2.3 -
> it's height is somehow incorrect. In both portrait and landscape mode,
> it displays at roughly 1/5th of the screen height (whereas I'd expect
> it to be ~50%). The width is fine, spanning the full width of either
> portait or landscape mode.

I managed to trace the issue back to the omap3 pvr sgx530 gralloc
library (specifically, xdpi/ydpi). Everything works fine with the
default gralloc implementation:

- If the kernel does not provide physical panel dimensions (most
panels do not), gralloc defaults to picking width/height such that
xdpi/ydpi end up being 160.0 DPI.

The omap3 sgx530 gralloc library I'm using (gralloc.omap3.so) appears
to have a hardcoded value of 96.0 for both xdpi and ydpi, resulting in
(among others) a messed up LatinIME.

Solution: replace 96.0 with 160.0 (note, IEEE 754 32-bit floating point format).

Binary search: 0000c042 Replace: 00002043

Joerie

Reply all
Reply to author
Forward
0 new messages