Search in sources :

Example 1 with CustomHeaderInnerCard

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

the class HeaderFragment method init_header_with_custom_inner_layout.

/**
     * This method builds a header with custom inner layout
     */
private void init_header_with_custom_inner_layout() {
    //Create a Card
    Card card = new Card(getActivity());
    //Create a CardHeader
    CustomHeaderInnerCard header = new CustomHeaderInnerCard(getActivity());
    //Add Header to card
    card.addCardHeader(header);
    //Set card in the CardView
    CardView cardView = (CardView) getActivity().findViewById(R.id.carddemo_header_inner);
    cardView.setCard(card);
}
Also used : CardView(it.gmariotti.cardslib.library.view.CardView) BaseCard(it.gmariotti.cardslib.library.internal.base.BaseCard) CustomExpandCard(it.gmariotti.cardslib.demo.cards.CustomExpandCard) CustomHeaderInnerCard(it.gmariotti.cardslib.demo.cards.CustomHeaderInnerCard) Card(it.gmariotti.cardslib.library.internal.Card) CustomHeaderInnerCard(it.gmariotti.cardslib.demo.cards.CustomHeaderInnerCard)

Example 2 with CustomHeaderInnerCard

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

the class NativeHeaderFragment method init_header_with_custom_inner_layout.

/**
     * This method builds a header with custom inner layout
     */
private void init_header_with_custom_inner_layout() {
    //Create a Card
    Card card = new Card(getActivity());
    //Create a CardHeader
    CustomHeaderInnerCard header = new CustomHeaderInnerCard(getActivity());
    //Add Header to card
    card.addCardHeader(header);
    //Set card in the CardViewNative
    CardViewNative cardViewNative = (CardViewNative) getActivity().findViewById(R.id.carddemo_header_inner);
    cardViewNative.setCard(card);
}
Also used : BaseCard(it.gmariotti.cardslib.library.internal.base.BaseCard) CustomExpandCard(it.gmariotti.cardslib.demo.cards.CustomExpandCard) CustomHeaderInnerCard(it.gmariotti.cardslib.demo.cards.CustomHeaderInnerCard) Card(it.gmariotti.cardslib.library.internal.Card) CustomHeaderInnerCard(it.gmariotti.cardslib.demo.cards.CustomHeaderInnerCard) CardViewNative(it.gmariotti.cardslib.library.view.CardViewNative)

Aggregations

CustomExpandCard (it.gmariotti.cardslib.demo.cards.CustomExpandCard)2 CustomHeaderInnerCard (it.gmariotti.cardslib.demo.cards.CustomHeaderInnerCard)2 Card (it.gmariotti.cardslib.library.internal.Card)2 BaseCard (it.gmariotti.cardslib.library.internal.base.BaseCard)2 CardView (it.gmariotti.cardslib.library.view.CardView)1 CardViewNative (it.gmariotti.cardslib.library.view.CardViewNative)1