use of it.gmariotti.cardslib.library.cards.topcolored.TopColoredCard in project cardslib by gabrielemariotti.
the class NativeTopColoredCardFragment method init_BlackTopColoredCard.
/**
* Builds a Material HalfColored Card
*/
private void init_BlackTopColoredCard() {
TopColoredCard card = TopColoredCard.with(getActivity()).setColorResId(R.color.carddemo_blackcolored_color).setTitleOverColor(R.string.carddemo_match).setupSubLayoutId(R.layout.carddemo_native_blackcolored_simple_title).setupInnerElements(new TopColoredCard.OnSetupInnerElements() {
@Override
public void setupInnerViewElementsSecondHalf(View secondHalfView) {
TextView mSimpleTitleView = (TextView) secondHalfView.findViewById(R.id.carddemo_blackcolored_simple_title);
if (mSimpleTitleView != null) {
mSimpleTitleView.setText("It is just an example!");
}
}
}).build();
//Set card in the CardViewNative
CardViewNative cardView = (CardViewNative) getActivity().findViewById(R.id.carddemo_blackcolored);
cardView.setCard(card);
}
use of it.gmariotti.cardslib.library.cards.topcolored.TopColoredCard in project cardslib by gabrielemariotti.
the class NativeTopColoredCardFragment method init_HalfColoredCard.
/**
* Builds a Material HalfColored Card
*/
private void init_HalfColoredCard() {
TopColoredCard card = TopColoredCard.with(getActivity()).setColorResId(R.color.carddemo_halfcolored_color).setTitleOverColor("22 mins to Ancona").setSubTitleOverColor("Light traffic on SS16").setupSubLayoutId(R.layout.carddemo_native_halfcolored_simple_title).setupInnerElements(new TopColoredCard.OnSetupInnerElements() {
@Override
public void setupInnerViewElementsSecondHalf(View secondHalfView) {
TextView mSimpleTitleView = (TextView) secondHalfView.findViewById(R.id.carddemo_halfcolored_simple_title);
if (mSimpleTitleView != null) {
mSimpleTitleView.setText("It is just an example!");
}
}
}).build();
//Set card in the CardViewNative
CardViewNative cardView = (CardViewNative) getActivity().findViewById(R.id.carddemo_halfcolored);
cardView.setCard(card);
}
Aggregations