Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Column GridView, variable width like GooglePlus App

So like most we have all used/seen the Google Plus App.

What interests me is the ColumnGridView they have developed, which not only does variable width, but variable height, seems that based on content will happily show the best space for the CardView.

Few possible solutions to replicate this, but only really looking for the best one which is of course the google implementation.

  1. Yes this can be achieved with a TableView - But that would be poor programming without a view recycler.
  2. My own custom implementation, based of a ListView/GridView - Not impossible but a lot of work.
  3. Ideally use the Google one which I am assuming is the same one for Google Now/Plus as they perform the same way based on the "Card" style items.

So has anyone come across this?

Any tutorials, examples, source I can use start with to save me some head way?

Maybe even some direction from the Google guys at how it is calculating the sizing?

Google Plus

like image 356
Chris.Jenkins Avatar asked Nov 18 '12 00:11

Chris.Jenkins


1 Answers

StaggeredGridView currently exist in the frameworks/ex/widgets/ folder of AOSP which appears to be what Google+ is using (or a variant of it, likely).

It was going to be in the latest support library release (r11) until it was reverted by Katherine Kuan in b54e36f2 and moved to the experimental repo.

like image 119
Jake Wharton Avatar answered Nov 01 '22 12:11

Jake Wharton