Java Code Examples for android.support.v17.leanback.widget.ImageCardView#setBadgeImage()
The following examples show how to use
android.support.v17.leanback.widget.ImageCardView#setBadgeImage() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CardPresenter.java From alltv with MIT License | 5 votes |
@Override public void onUnbindViewHolder(Presenter.ViewHolder viewHolder) { // Log.d(TAG, "onUnbindViewHolder"); ImageCardView cardView = (ImageCardView) viewHolder.view; // Remove references to images so that the garbage collector can free up memory cardView.setBadgeImage(null); cardView.setMainImage(null); }
Example 2
Source File: CardPresenter.java From leanback-homescreen-channels with Apache License 2.0 | 5 votes |
@Override public void onUnbindViewHolder(Presenter.ViewHolder viewHolder) { ImageCardView cardView = (ImageCardView) viewHolder.view; // Remove references to images so that the garbage collector can free up memory cardView.setBadgeImage(null); cardView.setMainImage(null); }
Example 3
Source File: CardPresenter.java From leanback-extensions with Apache License 2.0 | 5 votes |
@Override public void onUnbindViewHolder(Presenter.ViewHolder viewHolder) { Log.d(TAG, "onUnbindViewHolder"); ImageCardView cardView = (ImageCardView) viewHolder.view; // Remove references to images so that the garbage collector can free up memory cardView.setBadgeImage(null); cardView.setMainImage(null); }
Example 4
Source File: ApkPresenter.java From TvAppRepo with Apache License 2.0 | 5 votes |
@Override public void onUnbindViewHolder(ViewHolder viewHolder) { Log.d(TAG, "onUnbindViewHolder"); ImageCardView cardView = (ImageCardView) viewHolder.view; // Remove references to images so that the garbage collector can free up memory cardView.setBadgeImage(null); cardView.setMainImage(null); }
Example 5
Source File: CardPresenter.java From TvAppRepo with Apache License 2.0 | 5 votes |
@Override public void onUnbindViewHolder(Presenter.ViewHolder viewHolder) { ImageCardView cardView = (ImageCardView) viewHolder.view; // Remove references to images so that the garbage collector can free up memory cardView.setBadgeImage(null); cardView.setMainImage(null); }
Example 6
Source File: VideoCardPresenter.java From leanback-showcase with Apache License 2.0 | 5 votes |
@Override public void onUnbindViewHolder(ViewHolder viewHolder) { ImageCardView cardView = (ImageCardView) viewHolder.view; cardView.setBadgeImage(null); cardView.setMainImage(null); }
Example 7
Source File: CardPresenter.java From CumulusTV with MIT License | 5 votes |
@Override public void onUnbindViewHolder(Presenter.ViewHolder viewHolder) { ImageCardView cardView = (ImageCardView) viewHolder.view; // Remove references to images so that the garbage collector can free up memory cardView.setBadgeImage(null); cardView.setMainImage(null); }
Example 8
Source File: CardPresenter.java From BuildingForAndroidTV with MIT License | 5 votes |
@Override public void onUnbindViewHolder(Presenter.ViewHolder viewHolder) { Log.d(TAG, "onUnbindViewHolder"); ImageCardView cardView = (ImageCardView) viewHolder.view; // Remove references to images so that the garbage collector can free up memory cardView.setBadgeImage(null); cardView.setMainImage(null); }
Example 9
Source File: CardPresenter.java From alltv with MIT License | 4 votes |
@Override public void onBindViewHolder(Presenter.ViewHolder viewHolder, Object item) { ChannelData tvCh = (ChannelData) item; ImageCardView cardView = (ImageCardView) viewHolder.view; //Log.d(TAG, "onBindViewHolder"); if (tvCh.getStillImageUrl() != null) { ArrayList<EPGData> epgData = tvCh.getEPG(); Date date = new Date(); Boolean isAdultContent = false; for(int i=0; i<epgData.size(); i++) { if(date.compareTo(epgData.get(i).getEndTime()) < 0) { tvCh.setProgramName(epgData.get(i).getProgramName()); isAdultContent = epgData.get(i).isAdultContent(); break; } } if(tvCh.getProgramName().equals("") || isAdultContent) cardView.setTitleText(tvCh.getTitle()); else cardView.setTitleText(tvCh.getTitle() + " - " + tvCh.getProgramName()); cardView.setMainImageDimensions(CARD_WIDTH, CARD_HEIGHT); int ret = tvCh.getFavorite(); if(ret == 0) cardView.setBadgeImage(null); else if(ret == 1) cardView.setBadgeImage(cardView.getResources().getDrawable(R.drawable.star_icon, null)); else if(ret == 2) cardView.setBadgeImage(cardView.getResources().getDrawable(R.drawable.wavve_icon_24, null)); else if(ret == 3) cardView.setBadgeImage(cardView.getResources().getDrawable(R.drawable.tving_icon_24, null)); else if(ret == 4) cardView.setBadgeImage(cardView.getResources().getDrawable(R.drawable.oksusu_icon_24, null)); Picasso.get().load(tvCh.getStillImageUrl()) .memoryPolicy(MemoryPolicy.NO_CACHE, MemoryPolicy.NO_STORE) .into(cardView.getMainImageView()); } }
Example 10
Source File: ImgCardPresenter.java From AndroidTVLauncher with GNU General Public License v3.0 | 4 votes |
@Override public void onUnbindViewHolder(ViewHolder viewHolder) { ImageCardView cardView = (ImageCardView) viewHolder.view; cardView.setBadgeImage(null); cardView.setMainImage(null); }
Example 11
Source File: FunctionCardPresenter.java From AndroidTVLauncher with GNU General Public License v3.0 | 4 votes |
@Override public void onUnbindViewHolder(ViewHolder viewHolder) { ImageCardView cardView = (ImageCardView) viewHolder.view; cardView.setBadgeImage(null); cardView.setMainImage(null); }
Example 12
Source File: AppCardPresenter.java From AndroidTVLauncher with GNU General Public License v3.0 | 4 votes |
@Override public void onUnbindViewHolder(ViewHolder viewHolder) { ImageCardView cardView = (ImageCardView) viewHolder.view; cardView.setBadgeImage(null); cardView.setMainImage(null); }
Example 13
Source File: VideoContentCardPresenter.java From leanback-showcase with Apache License 2.0 | 4 votes |
@Override public void onUnbindViewHolder(Presenter.ViewHolder viewHolder) { ImageCardView cardView = (ImageCardView) viewHolder.view; cardView.setBadgeImage(null); cardView.setMainImage(null); }