Search in sources :

Example 1 with GoogleNowNativeWeatherCard

use of it.gmariotti.cardslib.demo.cards.GoogleNowNativeWeatherCard 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

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