My Work

Your Portfolio is empty. You can start adding Items throught your Wordpress admin panel!

All Posts in Android Tips

February 4, 2013 - 19 comments

15 quirky Android XML layout parameters to know

After working on Android widgets for the last two years I've learned a lot about limitations, inconsistencies, and ghostly parameters in Android XML layout files. Some parameters are simply "overly clever" so I'll offer some standard settings you should use. These suggestions will also help you effectively reduce the plethora of nanny nag warnings in the IDE.

These come in handy so take a moment to review. Read more

May 18, 2011 - 108 comments

A simple guide to 9-patch for Android UI

While I was working on my first Android app, I found 9-patch (aka 9.png) to be confusing and poorly documented. After a little while, I finally picked up on how it works and decided to throw together something to help others figure it out.

Basically, 9-patch uses png transparency to do an advanced form of 9-slice or scale9. The guides are straight, 1-pixel black lines drawn on the edge of your image that define the scaling and fill of your image. By naming your image file name.9.png, Android will recognize the 9.png format and use the black guides to scale and fill your bitmaps.

Here's a basic guide map:

Read more