use of it.gmariotti.cardslib.library.view.CardViewNative in project cardslib by gabrielemariotti.
the class NativeCardExpandFragment method init_custom_card_expand_clicking_text.
/**
* This method builds a custom card with expand/collapse action clickable in all card view
*/
private void init_custom_card_expand_clicking_text() {
//Create a Card
CustomCard2 card = new CustomCard2(getActivity());
card.setTitle("Click here to expand/collapse");
//This provides a simple (and useless) expand area
CardExpand expand = new CardExpand(getActivity());
//Set inner title in Expand Area
expand.setTitle(getString(R.string.demo_expand_customtitle3));
card.addCardExpand(expand);
//Set card in the cardView
CardViewNative cardView = (CardViewNative) getActivity().findViewById(R.id.carddemo_example_card_expand3);
cardView.setCard(card);
}
use of it.gmariotti.cardslib.library.view.CardViewNative in project cardslib by gabrielemariotti.
the class NativeCardWithListFragment method initCard.
/**
* This method builds a simple card
*/
private void initCard() {
//Create a Card
card = new GoogleNowNativeWeatherCard(getActivity());
card.init();
//Set card in the cardView
CardViewNative cardView = (CardViewNative) getActivity().findViewById(R.id.carddemo_weathercard);
cardView.setCard(card);
//Card
card2 = new GoogleNowStockCardwithList(getActivity());
card2.init();
//Set card in the cardView
CardViewNative cardView2 = (CardViewNative) getActivity().findViewById(R.id.carddemo_stockcard);
cardView2.setCard(card2);
}
use of it.gmariotti.cardslib.library.view.CardViewNative 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);
}
}
use of it.gmariotti.cardslib.library.view.CardViewNative in project cardslib by gabrielemariotti.
the class NativeCardExpandFragment method init_custom_card_expand.
/**
* This method builds a custom card with expand/collapse action clickable in all card view
*/
private void init_custom_card_expand() {
//Create a Card
CustomCard card = new CustomCard(getActivity());
//This provides a simple (and useless) expand area
CardExpand expand = new CardExpand(getActivity());
//Set inner title in Expand Area
expand.setTitle(getString(R.string.demo_expand_customtitle3));
card.addCardExpand(expand);
//Set card in the cardView
CardViewNative cardView = (CardViewNative) getActivity().findViewById(R.id.carddemo_example_card_expand2);
ViewToClickToExpand viewToClickToExpand = ViewToClickToExpand.builder().setupView(cardView);
card.setViewToClickToExpand(viewToClickToExpand);
cardView.setCard(card);
}
use of it.gmariotti.cardslib.library.view.CardViewNative in project cardslib by gabrielemariotti.
the class NativeCardExpandFragment method init_custom_card_expand_clicking_image.
/**
* This method builds a custom card with expand/collapse action clickable in all card view
*/
private void init_custom_card_expand_clicking_image() {
//Create a Card
Card card = new Card(getActivity());
//This provides a simple (and useless) expand area
CardExpand expand = new CardExpand(getActivity());
//Set inner title in Expand Area
expand.setTitle(getString(R.string.demo_expand_customtitle3));
card.addCardExpand(expand);
CustomThumbnail thumb = new CustomThumbnail(getActivity());
thumb.setDrawableResource(R.drawable.ic_smile);
card.addCardThumbnail(thumb);
//Set card in the cardView
CardViewNative cardView = (CardViewNative) getActivity().findViewById(R.id.carddemo_example_card_expand4);
cardView.setCard(card);
}
Aggregations