views:

78

answers:

1

Hello

I'm trying to mimic the layout of the icons in Facebook android app.

alt text

As you can see, this is a 2x3 layout, but if you flip it it becomes 3x2 layout. How to accomplish this?

+2  A: 

Solved here: http://stackoverflow.com/questions/3535958/how-to-setup-a-main-menu-layout-in-android/3536387#3536387

You can supply two layout files for landscape and portrait specifying the number of columns in the gridview in each case to achieve the 2X3 vs 3x2

TextView tv;
                Typeface tf = Typeface.createFromAsset(getResources().getAssets(), "font.ttf");
                tv.setTypeface(tf);
                tv.setTextSize(10);
Sameer Segal
This looks great but how to add text under images? Or is text part of image?
FrEaKmAn
You can supply a custom layout to the GridView adapter. You can set the font, typeface, size, style, etc for the TextView
Sameer Segal
Could you supply an example?
FrEaKmAn
I've edited my answer with code for fonts and size.
Sameer Segal