Android: Showing cards like layout as in Google Keep -


i wondering how show snapshot of notes, checklists, images in grid view. have no trouble creating grid view creating preview of challenge i'm facing right need add different type of views(text, checklist, imageview) grid according time of creation. works fine single type of view image or text only.

or in other words. how add different views dynamically gridview adapter?

all or appreciated.

thanks.

enter image description here

they surely not use gridview google keep - adapter nonetheless.

to use different views adapter can use different view types:

  1. override getviewtypecount() return number of view types support.
  2. return appropriate type in getitemviewtype(int position) specific item.
  3. create correct view in getview(int position, view convertview, viewgroup parent).

keep in mind rules recycling, viewholder , on still apply. multiple types recycling happens correct type.

marcus körner shared gist jake wharton on g+ recently might useful.


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -