nguyenngan / FacebookTypeImageGrid

Android RecyclerView that displays Image Grid Like facebook app

Home Page:http://abhilunagaria.blogspot.in/2016/06/best-way-to-display-multiple-image-grid.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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); }

About

Android RecyclerView that displays Image Grid Like facebook app

http://abhilunagaria.blogspot.in/2016/06/best-way-to-display-multiple-image-grid.html


Languages

Language:Java 100.0%