Posted by loading13
on October 29, 2008 at 12:58 PM PDT
Hello, I writting table UI element and I have text element that can have up to 2 characters. I wonder if the percental element width is better than width based on content width calculated via Font.getStringWidth().
If we design for smallest screen possible, the width of string "1234567890" may be around 50 pixels and take 40% of screen width (for 128x96 screens). When displayed on screen with 640px width, the same element will take 290 px space, but the "1234567890" will take not more that 200px using the default font. Thus presious 90px are wasted.
If we design for the big enough screen and hard-code it's percentage, the string may just not fit in the dedicated space.
I'm looking forward to your comments and ideas!