tags:

views:

125

answers:

1

I'm porting an application from iPhone to Android. The iPhone app has artwork for some dozen or more buttons in their normal and pressed state. That translated over just fine to Android. However, we of course currently don't have any images for the "focused" state.

Besides the work involved in creating all these focused button images, we're not sure exactly what color to set the focus too. Selection color varies from phone to phone, etc. We'd have to come up with some neutral "white glow" of some sort I suppose. Then the idea struck -- could we programmatically render a focus images for the buttons based on the current selection color? Have folks been doing anything like this in the Android dev community? Can you point me to some examples. A net search didn't turn up anything too useful, though perhaps I searched on the wrong keywords.

Thank you!

The Xdog.

A: 

Excellent question.

One thing you could do is get the buttons into the focused state on the iPhone, then take a screen snapshot.

A screenshot can be taken with the iPhone OS by pressing and holding the Home button, then pressing the Sleep/Wake button. You can also press and hold the Sleep/Wake button first, before pressing the Home button.

The screen will flash and the picture will be stored in the "Camera Roll" on the iPhone or in "Saved Photos" on the iPod touch. From there you can sync it to your computer.

A "button with focus" snapshot from the iPhone might be better than trying to jury-rig the focus highlights with current theme on the Android. This is because the iPhone image will be consistent with the other button images from the iPhone.

Peter

Peter vdL
Actually, I'm looking for code that actually applies the current selection color as a hue or highlight. Am wondering what some of the schemes people have come up with programmatically.
Jay Koutavas