Search in sources :

Example 41 with CardViewNative

use of it.gmariotti.cardslib.library.view.CardViewNative in project cardslib by gabrielemariotti.

the class NativeMiscCardFragment method initCardMayKnow.

/**
     * This method builds a simple card
     */
private void initCardMayKnow() {
    //Create a Card
    MayKnowCard card = new MayKnowCard(getActivity());
    card.setShadow(false);
    //Set card in the cardView
    CardViewNative cardView = (CardViewNative) getActivity().findViewById(R.id.carddemo_MayKnow);
    cardView.setCard(card);
    MayKnowCard card2 = new MayKnowCard(getActivity());
    card2.addCardHeader(null);
    card2.setShadow(true);
    CardViewNative mayView2 = (CardViewNative) getActivity().findViewById(R.id.carddemo_MayKnow2);
    mayView2.setCard(card2);
}
Also used : MayKnowCard(it.gmariotti.cardslib.demo.cards.MayKnowCard) CardViewNative(it.gmariotti.cardslib.library.view.CardViewNative)

Example 42 with CardViewNative

use of it.gmariotti.cardslib.library.view.CardViewNative in project cardslib by gabrielemariotti.

the class NativeMiscCardFragment method initCardSuggested.

/**
     * This method builds a suggested card example
     */
private void initCardSuggested() {
    SuggestedCard card = new SuggestedCard(getActivity());
    CardViewNative cardView = (CardViewNative) getActivity().findViewById(R.id.carddemo_suggested);
    cardView.setCard(card);
}
Also used : SuggestedCard(it.gmariotti.cardslib.demo.cards.SuggestedCard) CardViewNative(it.gmariotti.cardslib.library.view.CardViewNative)

Aggregations

CardViewNative (it.gmariotti.cardslib.library.view.CardViewNative)42 Card (it.gmariotti.cardslib.library.internal.Card)31 CardHeader (it.gmariotti.cardslib.library.internal.CardHeader)20 View (android.view.View)12 BaseCard (it.gmariotti.cardslib.library.internal.base.BaseCard)12 CustomCard (it.gmariotti.cardslib.demo.cards.CustomCard)11 CustomExpandCard (it.gmariotti.cardslib.demo.cards.CustomExpandCard)11 CustomHeaderInnerCard (it.gmariotti.cardslib.demo.cards.CustomHeaderInnerCard)11 ScrollView (android.widget.ScrollView)7 TextView (android.widget.TextView)6 CardExpand (it.gmariotti.cardslib.library.internal.CardExpand)6 MenuItem (android.view.MenuItem)4 CustomThumbCard (it.gmariotti.cardslib.demo.cards.CustomThumbCard)4 ViewToClickToExpand (it.gmariotti.cardslib.library.internal.ViewToClickToExpand)3 PopupMenu (android.widget.PopupMenu)2 GoogleNowBirthCard (it.gmariotti.cardslib.demo.cards.GoogleNowBirthCard)2 MayKnowCard (it.gmariotti.cardslib.demo.cards.MayKnowCard)2 SuggestedCard (it.gmariotti.cardslib.demo.cards.SuggestedCard)2 ProgressCard (it.gmariotti.cardslib.library.cards.ProgressCard)2 BaseSupplementalAction (it.gmariotti.cardslib.library.cards.actions.BaseSupplementalAction)2