I want to create a listView of cards, but after reading this blog post goolge-plus-layout, I\'m cards are a viable solution for a list of anything. The animation part seems
EDIT: Google provides a nice class called CardView. I didn't check it but it looks promising.
Here's the previous way, which also works fine (that's what I wrote before the edit) :
There is a nice tutorial here and a nice sample of it here .
in short , these are the files you can create:
listView definition:
android:divider="@null"
android:dividerHeight="10dp"
android:listSelector="@android:color/transparent"
android:cacheColorHint="@android:color/transparent"
android:headerDividersEnabled="true"
android:footerDividersEnabled="true"
also this:
m_list.addHeaderView(new View(this));
m_list.addFooterView(new View(this));
res/drawable/selector_card_background.xml
listView item :
res/layout/list_item_card.xml
res/drawable/layer_card_background_selected.xml
-
-
res/drawable/layer_card_background.xml
-
-