Search in sources :

Example 1 with CardThumbnailView

use of it.gmariotti.cardslib.library.view.component.CardThumbnailView in project cardslib by gabrielemariotti.

the class MayKnowCard method setupInnerViewElements.

@Override
public void setupInnerViewElements(ViewGroup parent, View view) {
    TextView title = (TextView) view.findViewById(R.id.carddemo_mayknow_main_inner_title);
    TextView subtitle = (TextView) view.findViewById(R.id.carddemo_mayknow_main_inner_subtitle);
    TextView add = (TextView) view.findViewById(R.id.carddemo_mayknow_main_inner_button);
    title.setText(getContext().getString(R.string.may_know_card_inner_title));
    subtitle.setText(getContext().getString(R.string.may_know_card_inner_subtitle));
    add.setClickable(true);
    CardViewWrapper cardView = getCardView();
    CardThumbnailView thumb = cardView.getInternalThumbnailLayout();
    if (thumb != null) {
        ViewGroup.LayoutParams lp = thumb.getLayoutParams();
        if (lp instanceof ViewGroup.MarginLayoutParams) {
            ((ViewGroup.MarginLayoutParams) lp).setMargins(25, 0, 0, 5);
        }
    }
}
Also used : ViewGroup(android.view.ViewGroup) TextView(android.widget.TextView) CardViewWrapper(it.gmariotti.cardslib.library.view.base.CardViewWrapper) CardThumbnailView(it.gmariotti.cardslib.library.view.component.CardThumbnailView)

Aggregations

ViewGroup (android.view.ViewGroup)1 TextView (android.widget.TextView)1 CardViewWrapper (it.gmariotti.cardslib.library.view.base.CardViewWrapper)1 CardThumbnailView (it.gmariotti.cardslib.library.view.component.CardThumbnailView)1