Skip to content
A backwards compatible implementation of GridLayout for Android
Latest commit 29618e0 Jan 20, 2012 @dlew Updated README
Failed to load latest commit information.
library Removed faulty reflection code Jan 9, 2012
samples Added visibility changing sample Jan 9, 2012
.gitignore Added local .gitignore Jan 8, 2012
LICENSE Added license file Jan 9, 2012 Updated README Jan 20, 2012

GridLayout Library

This library provides a version of GridLayout that works across all versions of Android 1.5+. As a side effect, this library also includes the lightweight Space as well.

For an introduction to GridLayout/Space, check out the Android Developers Blog post about the benefits and usage of GridLayout and Space.


Compiling this library requires that the build SDK version be set to 3.0 or above. (It uses some more modern methods if they are available.)


This is a copy of the GridLayout from Android, so its usage is very similar. The only difference is that some attributes you will need to use your project's namespace instead of the android namespace:

<com.gridlayout.GridLayout xmlns:android=""
    gridlayout:useDefaultMargins="true" >


Due to the inability to detect changes in child visibility in older versions of ViewGroup, it is necessary to call GridLayout.notifyChildVisibilityChanged() whenever you change the visibility of a child View of a GridLayout.

If you never change the visibility of children, you don't have to worry about this.

Something went wrong with that request. Please try again.