Donnerstag, 20. September 2012

Changing the icon size in a DraggableGridView

I love DraggableGridView. It's easy to use and looks really nice. I use it in one of my apps, called the DSO-Timer.

But there is one small thing, that bothers me. I couldn't find a way to customize the size of the icons.

So I emailed Thomas Quinn and asked him. A few hours later I received his answer:
Easily done. Just change this section of code in onLayout(...):

        //determine number of columns, at least 2
        colCount = 2;
        int sub = 240;
        w -= 280;
        while (w > 0)
        {
                colCount++;
                w -= sub;
                sub += 40;
        }

To something way simpler, like this:

        //determine number of columns for 50dp children
        colCount = w / 50;

This is the code where the size of the icons is calculated. After playing a bit around in the code, I ended up with this:


Donnerstag, 13. September 2012

Pixel Density Calculator

A very useful tool to easily calculate the pixel per inch (ppi).


Mittwoch, 5. September 2012

Need some screenshots with a nice smartphone frame?



Try Device Frame Generator at the Google Play Store for free. Its a little buggy, but produces nice pictures.

If I want to add a screenshot to a device frame, I always have to try it 2-3 times. The first times it just says "dimension do not match...", but after a few tries with the same image it works :)


This is an integrated screenshot of my app Net Speed Icon inside the new nexus phone.