Search in sources :

Example 1 with GoogleNowStockCardwithList

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

the class CardWithListFragment method initCard.

/**
     * This method builds a simple card
     */
private void initCard() {
    //Create a Card
    card = new GoogleNowWeatherCard(getActivity());
    card.init();
    //Set card in the cardView
    CardView cardView = (CardView) getActivity().findViewById(R.id.carddemo_weathercard);
    cardView.setCard(card);
    //Card
    card2 = new GoogleNowStockCardwithList(getActivity());
    card2.init();
    //Set card in the cardView
    CardView cardView2 = (CardView) getActivity().findViewById(R.id.carddemo_stockcard);
    cardView2.setCard(card2);
}
Also used : CardView(it.gmariotti.cardslib.library.view.CardView) GoogleNowWeatherCard(it.gmariotti.cardslib.demo.cards.GoogleNowWeatherCard) GoogleNowStockCardwithList(it.gmariotti.cardslib.demo.cards.GoogleNowStockCardwithList)

Example 2 with GoogleNowStockCardwithList

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

the class NativeCardWithListFragment method initCard.

/**
     * This method builds a simple card
     */
private void initCard() {
    //Create a Card
    card = new GoogleNowNativeWeatherCard(getActivity());
    card.init();
    //Set card in the cardView
    CardViewNative cardView = (CardViewNative) getActivity().findViewById(R.id.carddemo_weathercard);
    cardView.setCard(card);
    //Card
    card2 = new GoogleNowStockCardwithList(getActivity());
    card2.init();
    //Set card in the cardView
    CardViewNative cardView2 = (CardViewNative) getActivity().findViewById(R.id.carddemo_stockcard);
    cardView2.setCard(card2);
}
Also used : GoogleNowNativeWeatherCard(it.gmariotti.cardslib.demo.cards.GoogleNowNativeWeatherCard) GoogleNowStockCardwithList(it.gmariotti.cardslib.demo.cards.GoogleNowStockCardwithList) CardViewNative(it.gmariotti.cardslib.library.view.CardViewNative)

Aggregations

GoogleNowStockCardwithList (it.gmariotti.cardslib.demo.cards.GoogleNowStockCardwithList)2 GoogleNowNativeWeatherCard (it.gmariotti.cardslib.demo.cards.GoogleNowNativeWeatherCard)1 GoogleNowWeatherCard (it.gmariotti.cardslib.demo.cards.GoogleNowWeatherCard)1 CardView (it.gmariotti.cardslib.library.view.CardView)1 CardViewNative (it.gmariotti.cardslib.library.view.CardViewNative)1