Cocos2d has always been a popular choice for iPhone game development.  Now there’s now cocos2d-x (, a spinoff initiated by Walzer Wang. cocos2d-x is a cross platform version of cocos2d that produces iOS and Android app (plus Windows executable output as bonus if you like).  Cocos2d-x accomplishes the cross-platformness by using native C/C++ code.  This […]

I was having some issue customizing the look and behavior of the default SeekBar so I tried writing a custom one. Here’s the result, hope it’s useful and interesting: My approach is to create a Layout consisting of two ImageViews: a “slider bar” and a “slider thumb” images. Then, in the onDraw function, I draw […]

One of the most common layout is the three-sections-layout where an application contains a Header section on top, a Content section in the middle, and a Footer section in the bottom.  The Header section may contain the application title and the Footer may contain advertisement, buttons, or tabs. For example in the game below, I am using […]

It has been a long time since Java was introduced and Java is no longer the darling it once was in the web-app arena or applets; partly because much of its functionality has now been replaced by Flash and Javascript.  Although Java is still a force in the back-end/server side and enterprise arena, you don’t […]

Chrome is shaping up to be the best browser around.  It’s fast and it is developer-friendly, with its own Firebug-like tools.  Under View->Developer->Developer Tools you can find the goodie. See below for screenshot. The Element inspector can be accessed with the Magnfying Glass icon on the bottom, and then you can hover your mouse to […]

This tutorial demonstrates how to use a custom view class (that is a class derived from View or its subclass) in an XML layout. This demonstration assumes basic familiarity with Android SDK and its XML layouting mechanism, the code is written in Android SDK 2.1. Creating The Custom View Class To begin with, let’s create […]

This tutorial is designed specifically for those wanting to use Eclipse Ganymede (although Eclipse Gallileo is similar, this post won’t deal with Gallileo installation). Note: much of this installation process are described in and for experienced programmer, that document might be enough.   This tutorial is more detailed but if you encounter any problem, you […]

There are times when you might want to capture the screen for demonstration or tutorial purposes.  The easiest way is using the ddms application included in the Android SDK (  This example is using Android SDK 2. Connect your phone with the computer Goto the folder where the Android SDK is, (and under tools folder) […]