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.
they surely not use gridview google keep - adapter nonetheless.
to use different views adapter can use different view types:
- override
getviewtypecount()
return number of view types support. - return appropriate type in
getitemviewtype(int position)
specific item. - 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.