Latest Entries »


The androidicon gimpfu script floating around does nto have xdpi or ldi support, so I added it. The gist for it.

Navigation Test One

Okay so I want swipe navigation through 5 application screens, 4 corners and the center representing the dashboard. The idea is to use the appLogo as the navigation indicator that way you take up no extra space and within the UI of the application itself.

Just enough contrast in the logo so whatever I use as the navigation indicator shows up in a way that is immediately discernible to the end user. Thus, now since I have the graphics worked out I can focus on competing the swipe navigation code this week. Of course the graphics may change. Why? I may need to provide a visual hint that the navigation indicators will be there, for  example I could do a rectangle select and modify the layer with dodge, burn, grain extract, etc to contrast just enough visually that the user sees a rectangle in all the four corners.

My Gimp Palettes and Gradients for Android UX at DeviantArt.

If yo will be using 3d to creatively impact your android UI, DAZ3d is offering free downloads of their pro versions of Bryce,Hexagon, and DazStudio until the end of February. The Daz link can be found in this article at the  bottom of the article. While Painter has an opensource clone called MyPaint which is quite good as a replacement, Bryce and Daz Studio do not have good opensource replacements. Its over $800 in free software.

Android Design Site

So we have an android design site. Yeah, some details are backwards though. You know that zip file of color swatches that you downloaded from that site? Did you examine the ase, aco or gpl file yet, no really?

Let me explain something. I do not now about you but when I work with graphics typically I take the palette file and break that up into a palette file for each color. Why? Because then you can derive a gradient which obviously should match those color tones anyway. And having those gradients and palettes, 9 in total will than allow you to do very good looking icons because they are using the right colors.

Sorry was kind of ‘knee-deep’ in planning how I will be executing my application themes that will derive from the Holo theme so that I have some control over how my application looks in pre android-4 devices.

I think i found the avenue that I want to take my UI direction into. no one has done an SVG version of actionnbar yet and in the apps I am building, I somewhat need one.

How to get rid of the AppMenu

Now Google recently gave some suggestions on how to get rid of the AppMenu since the next Google IO device will not have a hardware menu button. There are not bad suggestions. But, I think we can do it in a new and cool neat way that Google ha not considered.

Jon Deutsch of theVerge has suggested a corner to center swipe to navigate all the 5 home screens but he had some details backwards. Use Case:

1. On any screen corner to center swipe takes you to the next screen if not already at that screen. Use a small triangle at corner to indicate which screen user is at.

2. To go to the home-screen, ie dash board start screen is a center tap.

Thus, I guess I have one more project to upload to github and write a coding article about this weekend and put on The only disadvantage I see is its greatest feature in that you can only have five screens. Also somehow we want to scale it so that if someone is on table that they do not have to swipe clear from the corner to center to get that navigation to work.

LruCache with Context

Per Google engineer’s comments last night, I submitted some new code to Android, for those that cannot wait the gits is:

and the feature issue in Adnroid bugs is:


If you would like to see it added, obviously vote it up.

We have all seen this:

Log.d(tag, myClass.getSimpleName() + ":" + msg, tr);
Log.d(tag, obj.getClass().getSimpleName() + ":" + msg);

With it always on the programmer to write the extra log details per class they want to log. what if we did not have to? What if in a class we have this instead:


//in our method we want to log
// or
OurLogger.i(“tag” “message”);

and we get something like this:

08-01 10:38:56.446: INFO/MyTAG(100): [MyPackage.Name][MyClassName][Method][122]
08-01 10:38;57.447: INFO/MyTag(100): [MyPackage.Name][MyClassName][Method][12]

You will notice that I will be getting a stack trace back with all my packages, classes, and methods labeled and even line numbers. Now some things,this is only for those who use instrumented testing. How did I do it? The article at my gh-pages is coming, you should probably bookmark that site.. Fro those that cannot wait, obviously I am using Stack Trace.

But, I am using some new tricks that are somewhat non obvious. But the main thing I have reduced my coding log statements to something extremely simple that is configurable to give me enough details when I want it with no increase in coding log statements to get that detail, ie I hacked the Logging. Neat huh?


Error in LruCache

First up, we have somewhat an error of omission. Basically hasKey method is missing:

public synchronized boolean hasKey(K key) {
return map.containsKey(key);

Yeah we kind of need that little method.

Second things that is missing, when they re-factored LruCache I think they forgot the original reason why someone thought using weak-reference might be a good idea. We have two magical things to tell the GC what items not to do GC on right away, Soft Reference and Weak Reference.

Soft Reference is the stronger of the two and should be used when cache Drawables or anything else that has an activity context. David Wu coded a LruSoftcache with that in mind.  The key question now is do we really need ot keep a LruCache using Weak References around. The only use case I can think of is if you are downloading images for your application,large ones, and want the GC to operate on them sooner than a Soft Reference might allow. Also I can think of some game object pool cache use cases as well.

What is nice about the Android platform is that you can browse the git commits and get some historical idea of the re-factoring of a class which gives you clues on to what to track down and analyze. Its not like 1995 with java coming out where you had a black bock box and had to guess.