Life of Apps

Grid View, Font Changes and a New Icon!

The app received its biggest change so far with the main screen now displaying images in a grid instead of a list. I was planning to write the grid using the default components when I came across etsy's AndroidStaggeredGrid. A simple and minimal grid with options to control the number of columns, margins and padding. The reason why I chose this over other custom controls was that it had minimal impact on my existing code. The AndroidStaggeredGrid control extended from AbsListView so most of the code that I had written could be reused.
StaggeredGridView thingsList = (StaggeredGridView)findViewById(;


As I had earlier extended from ListActivity, I could get a few features out of the box: such as a default TextView to show on empty. Now, even after calling an explicit setEmptyView method, I was not able to get the desired result. So had to work around by adding a TextView on a FlowLayout that would only show when the grid was empty. But other than this the other changes (listener etc) were minimal.


Font Changes

While the Roboto font is a fine one, I was getting bored of seeing it, as it is the default in almost all apps. So, decided to replace it with a sans-serif open source font.
Typeface typeface = Typeface.createFromAsset( getResources().getAssets(), "SourceSansPro-Regular.otf");

Also, added a few icons to spruce up the view screen. The base icons are from


A New Launcher Icon! 

And finally, I created a new launcher icon using using Roman Nurik's Android Asset Studio. The launcher icon is also displayed in the About screen of the app.


Bug Fixes

Along with the new enhancements, a bug related to images was fixed. The images though were stored in a directory created by Thingse, were still referring to their original location. Any delete of the original image would throw a NullPointerException and cause the app to crash. I fixed this by pointing to the right location and also hid the images directory where Thingse stores the captured/selected images from gallery apps. This was done by starting the directory name with a "." (dot) and additionally adding a "nomedia" file in the directory.


Visit for apps developed by Danesh

No comments :

Post a Comment

Leave a Comment...