Sunday, April 18, 2010

Underlined text in Android

Again, I found it surprisingly hard to find a TextStyle for underlined text in a standard TextView. After spending Too Long navigating API reference, it dawned on me that good-ol' OO concepts can come to the rescue--sub-classing. So, here's a neat little class that achieves underlining in a TextView:


public static class TitleTextView extends TextView
{
public TitleTextView(Context c)
{
super(c);
mPaint = new Paint();
mPaint.setColor(Color.BLACK);
}

Paint mPaint;

@Override
protected void onDraw(Canvas canvas)
{
super.onDraw(canvas);

// underline the text
canvas.drawLine(0, super.getHeight() - 1, super.getWidth(),
super.getHeight() - 1, mPaint);
}
}

Monday, March 22, 2010

Getting Onto The Wave

Google has continued to frustrate us Australian Android developers by continuing to ignore emails and developer forum posts to the tune of "when can Australian Android developers publish paid apps?"

Well, I've gotten tired of waiting so have researched alternatives like the Nokia Ovi Store. Granted it's not Android, but they do support JavaME content, so off we go. Am going to try out the new easy-peasy business model offered by the new slew of app-stores, and see how it goes.

I will be debuting with an arcade game called Emerald Hunt, which I originally developed for the humble Palm Pilot. Huzzah!