Search in sources :

Example 1 with UniversalImageLoaderCard

use of it.gmariotti.cardslib.demo.extras.cards.UniversalImageLoaderCard in project cardslib by gabrielemariotti.

the class UniversalImageLoaderFragment method initCard.

/**
     * This method builds a simple card
     */
private void initCard() {
    //Init an array of Cards
    ArrayList<Card> cards = new ArrayList<Card>();
    for (int i = 0; i < 200; i++) {
        UniversalImageLoaderCard card = new UniversalImageLoaderCard(this.getActivity(), options);
        card.setTitle("A simple card loaded with Universal-Image-Loader " + 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);
    }
}
Also used : CardListView(it.gmariotti.cardslib.library.view.CardListView) ArrayList(java.util.ArrayList) UniversalImageLoaderCard(it.gmariotti.cardslib.demo.extras.cards.UniversalImageLoaderCard) CardArrayAdapter(it.gmariotti.cardslib.library.internal.CardArrayAdapter) Card(it.gmariotti.cardslib.library.internal.Card) UniversalImageLoaderCard(it.gmariotti.cardslib.demo.extras.cards.UniversalImageLoaderCard)

Aggregations

UniversalImageLoaderCard (it.gmariotti.cardslib.demo.extras.cards.UniversalImageLoaderCard)1 Card (it.gmariotti.cardslib.library.internal.Card)1 CardArrayAdapter (it.gmariotti.cardslib.library.internal.CardArrayAdapter)1 CardListView (it.gmariotti.cardslib.library.view.CardListView)1 ArrayList (java.util.ArrayList)1