/** This method builds a standard header with a custom expand/collpase */ private Card init_standard_header_with_expandcollapse_button_custom_area(String titleHeader) { // Create a Card Card card = new Card(getActivity()); // Create a CardHeader CardHeader header = new CardHeader(getActivity()); // Set the header title header.setTitle(titleHeader); // Set visible the expand/collapse button header.setButtonExpandVisible(true); // Add Header to card card.addCardHeader(header); // This provides a simple (and useless) expand area CustomExpandCard expand = new CustomExpandCard(getActivity()); // Add Expand Area to Card card.addCardExpand(expand); return card; }