Git Product home page Git Product logo

android-gridlayout's Introduction

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.

Compilation

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.)

Usage

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="http://schemas.android.com/apk/res/android"
    xmlns:gridlayout="http://schemas.android.com/apk/res/com.mycompany.myapp"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    gridlayout:alignmentMode="alignBounds"
    gridlayout:columnCount="4"
    gridlayout:columnOrderPreserved="false"
    gridlayout:useDefaultMargins="true" >

Caveats

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.

android-gridlayout's People

Contributors

dlew avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.