Jan 31, 2012

How to write Android Style and Themes ?


We all know that Android has Style and Theme feature, We know that it work like CSS in context of HTML/Web. but I feel it is the most unexplored feature of Android. Since last few days I am working on it and I have create two theme named ThemeBlue and ThemeGreen. (Check attached screenshot)

I figure out following pros and cons. 

Pros

1. We can avoid Image (PNG,Bitmap,etc..) I also reduce size of APK 
2. We don't require images for Multiple screen resolution.
3. Less Memory allocation compare to Images


Cons

1. Only four shapes supported (rectangle, ring, ovel, line). we can not create complex shapes using it.
2. Gradient isn't supports by Stroke.
3. layer-list has limited feature, layer-list isn't support to arrange layer in specific/relative position.
4. Shape does not support path.




continue reading How to write Android Style and Themes ?