Search in sources :

Example 1 with GplayCard

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

the class NativeGPlayCardFragment method initCardGooglePlay.

/**
     * This method builds a simple card
     */
private void initCardGooglePlay() {
    //Create a Card
    GplayCard card = new GplayCard(getActivity());
    //Set card in the cardView
    CardViewNative cardView = (CardViewNative) getActivity().findViewById(R.id.carddemo_Gplay1);
    cardView.setCard(card);
    //Create a Card
    GplayCard card2 = new GplayCard(getActivity());
    //Set card in the cardView
    CardViewNative cardView2 = (CardViewNative) getActivity().findViewById(R.id.carddemo_Gplay2);
    cardView2.setCard(card2);
    if (Utils.isTablet(getActivity())) {
        //Create a Card
        GplayCard card3 = new GplayCard(getActivity());
        //Set card in the cardView
        CardViewNative cardView3 = (CardViewNative) getActivity().findViewById(R.id.carddemo_Gplay3);
        if (cardView3 != null)
            cardView3.setCard(card3);
    }
}
Also used : GplayCard(it.gmariotti.cardslib.demo.cards.GplayCard) CardViewNative(it.gmariotti.cardslib.library.view.CardViewNative)

Example 2 with GplayCard

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

the class GPlayCardFragment method initCardGooglePlay.

/**
     * This method builds a simple card
     */
private void initCardGooglePlay() {
    //Create a Card
    GplayCard card = new GplayCard(getActivity());
    //Set card in the cardView
    CardView cardView = (CardView) getActivity().findViewById(R.id.carddemo_Gplay1);
    cardView.setCard(card);
    //Create a Card
    GplayCard card2 = new GplayCard(getActivity());
    //Set card in the cardView
    CardView cardView2 = (CardView) getActivity().findViewById(R.id.carddemo_Gplay2);
    cardView2.setCard(card2);
    if (Utils.isTablet(getActivity())) {
        //Create a Card
        GplayCard card3 = new GplayCard(getActivity());
        //Set card in the cardView
        CardView cardView3 = (CardView) getActivity().findViewById(R.id.carddemo_Gplay3);
        if (cardView3 != null)
            cardView3.setCard(card3);
    }
}
Also used : GplayCard(it.gmariotti.cardslib.demo.cards.GplayCard) CardView(it.gmariotti.cardslib.library.view.CardView)

Aggregations

GplayCard (it.gmariotti.cardslib.demo.cards.GplayCard)2 CardView (it.gmariotti.cardslib.library.view.CardView)1 CardViewNative (it.gmariotti.cardslib.library.view.CardViewNative)1