use of it.gmariotti.cardslib.demo.extras.cards.IonCard in project cardslib by gabrielemariotti.
the class IonFragment method initCard.
/**
* This method builds a simple list of cards
*/
private void initCard() {
//Init an array of Cards
ArrayList<Card> cards = new ArrayList<Card>();
for (int i = 0; i < 200; i++) {
IonCard card = new IonCard(this.getActivity());
card.setTitle("A simple card loaded with Ion " + i);
card.setSecondaryTitle("Simple text..." + i);
card.setCount(i);
cards.add(card);
}
CardArrayAdapter mCardArrayAdapter = new CardArrayAdapter(getActivity(), cards);
CardListView listView = (CardListView) getActivity().findViewById(R.id.carddemo_extra_list_picasso);
if (listView != null) {
listView.setAdapter(mCardArrayAdapter);
}
}
Aggregations