Search in sources :

Example 6 with ImageCardView

use of android.support.v17.leanback.widget.ImageCardView in project butter-android by butterproject.

the class LoadingCardPresenter method onCreateViewHolder.

@Override
public ViewHolder onCreateViewHolder(final ViewGroup parent) {
    final ImageCardView cardView = new ImageCardView(context);
    cardView.setInfoAreaBackgroundColor(defaultInfoBackgroundColor);
    cardView.setFocusable(true);
    cardView.setFocusableInTouchMode(true);
    return new ViewHolder(cardView);
}
Also used : ImageCardView(android.support.v17.leanback.widget.ImageCardView)

Example 7 with ImageCardView

use of android.support.v17.leanback.widget.ImageCardView in project cw-omnibus by commonsguy.

the class VideoPresenter method onCreateViewHolder.

@Override
public ViewHolder onCreateViewHolder(ViewGroup parent) {
    ImageCardView cardView = new ImageCardView(ctxt);
    cardView.setFocusable(true);
    cardView.setFocusableInTouchMode(true);
    return (new Holder(cardView));
}
Also used : ImageCardView(android.support.v17.leanback.widget.ImageCardView)

Example 8 with ImageCardView

use of android.support.v17.leanback.widget.ImageCardView in project android-UniversalMusicPlayer by googlesamples.

the class CardPresenter method onCreateViewHolder.

@Override
public ViewHolder onCreateViewHolder(ViewGroup parent) {
    LogHelper.d(TAG, "onCreateViewHolder");
    ImageCardView cardView = new ImageCardView(mContext);
    cardView.setFocusable(true);
    cardView.setFocusableInTouchMode(true);
    cardView.setBackgroundColor(mContext.getResources().getColor(R.color.default_background));
    return new CardViewHolder(cardView);
}
Also used : ImageCardView(android.support.v17.leanback.widget.ImageCardView)

Example 9 with ImageCardView

use of android.support.v17.leanback.widget.ImageCardView in project vlc-android by videolan.

the class CardPresenter method onCreateViewHolder.

@Override
public ViewHolder onCreateViewHolder(ViewGroup parent) {
    ImageCardView cardView = new ImageCardView(mContext);
    cardView.setFocusable(true);
    cardView.setFocusableInTouchMode(true);
    cardView.setBackgroundColor(ContextCompat.getColor(mContext, R.color.lb_details_overview_bg_color));
    cardView.setMainImageDimensions(CARD_WIDTH, CARD_HEIGHT);
    return new ViewHolder(cardView);
}
Also used : ImageCardView(android.support.v17.leanback.widget.ImageCardView)

Example 10 with ImageCardView

use of android.support.v17.leanback.widget.ImageCardView in project ring-client-android by savoirfairelinux.

the class IconCardPresenter method onCreateView.

@Override
protected ImageCardView onCreateView() {
    ImageCardView imageCardView = new ImageCardView(getContext());
    final ImageView image = imageCardView.getMainImageView();
    image.setBackgroundResource(R.drawable.icon_focused);
    image.getBackground().setAlpha(0);
    imageCardView.setOnFocusChangeListener((v, hasFocus) -> animateIconBackground(image.getBackground(), hasFocus));
    return imageCardView;
}
Also used : ImageCardView(android.support.v17.leanback.widget.ImageCardView) ImageView(android.widget.ImageView)

Aggregations

ImageCardView (android.support.v17.leanback.widget.ImageCardView)12 ImageView (android.widget.ImageView)3 BitmapDrawable (android.graphics.drawable.BitmapDrawable)2 TextView (android.widget.TextView)2 Episode (butter.droid.provider.base.model.Episode)1