use of it.gmariotti.cardslib.demo.cards.CustomHeaderExample1 in project cardslib by gabrielemariotti.
the class HeaderFragment method init_header_with_custom_layout.
/**
* This method builds a header with full custom layout
*/
private void init_header_with_custom_layout() {
//Create a Card
Card card = new Card(getActivity());
//Create a CardHeader
CustomHeaderExample1 header = new CustomHeaderExample1(getActivity());
//Add Header to card
card.addCardHeader(header);
//Set card in the CardView
CardView cardView = (CardView) getActivity().findViewById(R.id.carddemo_header_layout);
cardView.setCard(card);
}
use of it.gmariotti.cardslib.demo.cards.CustomHeaderExample1 in project cardslib by gabrielemariotti.
the class NativeHeaderFragment method init_header_with_custom_layout.
/**
* This method builds a header with full custom layout
*/
private void init_header_with_custom_layout() {
//Create a Card
Card card = new Card(getActivity());
//Create a CardHeader
CustomHeaderExample1 header = new CustomHeaderExample1(getActivity());
//Add Header to card
card.addCardHeader(header);
//Set card in the CardViewNative
CardViewNative cardViewNative = (CardViewNative) getActivity().findViewById(R.id.carddemo_header_layout);
cardViewNative.setCard(card);
}
Aggregations