Thursday, August 5, 2010

Generala v1.57

 - Bug Fix: White text on Droid X
 - Update: SD card storage support

I think one or two other things might've snuck in there too, it's been a while since Generala got an update.  Of the above items, the interesting one is the Droid X bug.  Let's discuss that.

Basically, what I was doing to control the color of the score text was to use a 'style'.  These are defined in an xml file and work basically like a CSS style, in the sense that you bundle up a font, font size, font color, and a number of other things all into a single object -- say, one called "BlackScriptBold".  Then, when you define your text fields, you simply hook that field up to BlackScriptBold to give it all those properties.

In general,  this is good practice, because that way if you need to do something like change the font, you only change the one style entry and everything using that style automatically uses that new setting.  Otherwise, you'd have to visit every place where you were using your script font and change them all individually, which in a decent size project could be dozens or hundreds of locations.  Obviously, there's a lot more margin for error when making a hundred scattered changes.  Thus, good practice.

So, this is what I was doing for the score boxes in Generala.  I got a bug report a week or two ago saying the scores showed up in white on the Droid X, which was nearly impossible to read against the paper-grain background.  I double checked that everything still looked right, which considering it works everywhere else I was pretty sure of, and ultimately ended up forcibly setting the color to black for each individual score box instead of in the style.  This fixed the issue.

The moral of this story is that if you're having weird issues with Android UI display on a Droid X, it's possible Motorola has munged up their handling of styles somehow.  Between this and the live wallpaper filtering bug (which I hope and pray gets fixed with the Droid's 2.2 update) Motorola's been a bit iffy with their handling of standard functionality so far...

No comments:

Post a Comment