Skip to content

abhisheklunagaria/FacebookTypeImageGrid

Repository files navigation

FacebookTypeImageGrid

FacebookTypeImageGrid is for displaying multiple image like facebook using AsymmetricGridView Library for support items with colspan and rowspan

AsymmetricGridView is a custom view that implements multiple columns and variable size elements

Radomized ColSpan and RowSpan for making Grid

There are common logic for manage colspan and rowspan

    ItemImage i = new ItemImage(4,Image4,Image4);
    int colSpan = Math.random() < 0.2f ? 2 : 1;
    int rowSpan = colSpan;
    i.setColumnSpan(colSpan);
    i.setRowSpan(rowSpan);
    i.setPosition( currentOffset + 3);

in childview's Adapter AsymmetricItem Type is necessary

@Override public AsymmetricItem getItem(int position) { return (AsymmetricItem) items.get(position); }

Releases

No releases published

Packages

No packages published

Languages