@Override
    public void onBindViewHolder(final ViewHolder holder, final int position) {
        final Item item = mItemList.get(position);
        setListener(mListener);
        String dateStr = item.getPubDate();
        DateFormat formatter = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss", Locale.getDefault());
        try {
            Date date = formatter.parse(dateStr);
            String pubDateStr = DateUtils.formatAbbrev(mContext, date);
            String[] dateMonth = pubDateStr.split(" ");
            holder.mTvMonth.setText(dateMonth[0]);
            holder.mTvDate.setText(dateMonth[1]);
        } catch (ParseException e) {
            e.printStackTrace();
            GoogleAnalyticsUtil.trackException(mContext, e);
        }
        if (null != item.getItunesDuration()) {
            //Check if the duration is already formatted
            if (item.getItunesDuration().contains(":")) {
                holder.mTvPodcastDuration.setText(item.getItunesDuration());
            } else {
                long min = Integer.parseInt(item.getItunesDuration()) / 60000;
                long sec = Integer.parseInt(item.getItunesDuration()) % 60000 / 1000;
                holder.mTvPodcastDuration.setText(String.format(mContext.getResources().getString(R.string.duration), min, sec));
            }
        }
        holder.mTvPodcastTitle.setText(item.getTitle());
        holder.mPlayImageButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                //TODO:: Change Icon based on action. If playing, equalizer icon, pause pause-icon etc
                String imageUrl = "";
                Cursor cursor = mContext.getContentResolver().query(mUri, null, null, null, null);
                if (cursor != null) {
                    while (cursor.moveToNext()) {
                        imageUrl = cursor.getString(ApplicationConstants.COLUMN_SUBSCRIBED_PODCAST_FEED_IMAGE_URL);
                    }
                }
                Track track = new Track();
                track.setTitle(item.getTitle());
                track.setStreamUrl(item.getEnclosure().getUrl());
                track.setArtist(item.getItunesAuthor());
                track.setArtworkUrl(imageUrl);
                track.setDurationInMilli(Converter.getMilliSeconds(item.getItunesDuration()));
                if (mListener != null) {
                    mListener.onTrackClicked(track);
                }
            }
        });
        holder.mEpisodeRl.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                displayBottomSheet(item);
            }
        });
    }
@Override
    public void onBindViewHolder(final ViewHolder holder, final int position) {
        final Item item = mItemList.get(position);
        setListener(mListener);
        String dateStr = item.getPubDate();
        DateFormat formatter = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss", Locale.getDefault());
        try {
            Date date = formatter.parse(dateStr);
            String pubDateStr = DateUtils.formatAbbrev(mContext, date);
            String[] dateMonth = pubDateStr.split(" ");
            holder.mTvMonth.setText(dateMonth[0]);
            holder.mTvDate.setText(dateMonth[1]);
        } catch (ParseException e) {
            e.printStackTrace();
            GoogleAnalyticsUtil.trackException(mContext, e);
        }
        if (null != item.getItunesDuration()) {
           
            if (item.getItunesDuration().contains(":")) {
                holder.mTvPodcastDuration.setText(item.getItunesDuration());
            } else {
                long min = Integer.parseInt(item.getItunesDuration()) / 60000;
                long sec = Integer.parseInt(item.getItunesDuration()) % 60000 / 1000;
                holder.mTvPodcastDuration.setText(String.format(mContext.getResources().getString(R.string.duration), min, sec));
            }
        }
        holder.mTvPodcastTitle.setText(item.getTitle());
        holder.mPlayImageButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
               
                String imageUrl = "";
                Cursor cursor = mContext.getContentResolver().query(mUri, null, null, null, null);
                if (cursor != null) {
                    while (cursor.moveToNext()) {
                        imageUrl = cursor.getString(ApplicationConstants.COLUMN_SUBSCRIBED_PODCAST_FEED_IMAGE_URL);
                    }
                }
                Track track = new Track();
                track.setTitle(item.getTitle());
                track.setStreamUrl(item.getEnclosure().getUrl());
                track.setArtist(item.getItunesAuthor());
                track.setArtworkUrl(imageUrl);
                track.setDurationInMilli(Converter.getMilliSeconds(item.getItunesDuration()));
                if (mListener != null) {
                    mListener.onTrackClicked(track);
                }
            }
        });
        holder.mEpisodeRl.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                displayBottomSheet(item);
            }
        });
    }
@override public void onbindviewholder(final viewholder holder, final int position) { final item item = mitemlist.get(position); setlistener(mlistener); string datestr = item.getpubdate(); dateformat formatter = new simpledateformat("eee, dd mmm yyyy hh:mm:ss", locale.getdefault()); try { date date = formatter.parse(datestr); string pubdatestr = dateutils.formatabbrev(mcontext, date); string[] datemonth = pubdatestr.split(" "); holder.mtvmonth.settext(datemonth[0]); holder.mtvdate.settext(datemonth[1]); } catch (parseexception e) { e.printstacktrace(); googleanalyticsutil.trackexception(mcontext, e); } if (null != item.getitunesduration()) { if (item.getitunesduration().contains(":")) { holder.mtvpodcastduration.settext(item.getitunesduration()); } else { long min = integer.parseint(item.getitunesduration()) / 60000; long sec = integer.parseint(item.getitunesduration()) % 60000 / 1000; holder.mtvpodcastduration.settext(string.format(mcontext.getresources().getstring(r.string.duration), min, sec)); } } holder.mtvpodcasttitle.settext(item.gettitle()); holder.mplayimagebutton.setonclicklistener(new view.onclicklistener() { @override public void onclick(view v) { string imageurl = ""; cursor cursor = mcontext.getcontentresolver().query(muri, null, null, null, null); if (cursor != null) { while (cursor.movetonext()) { imageurl = cursor.getstring(applicationconstants.column_subscribed_podcast_feed_image_url); } } track track = new track(); track.settitle(item.gettitle()); track.setstreamurl(item.getenclosure().geturl()); track.setartist(item.getitunesauthor()); track.setartworkurl(imageurl); track.setdurationinmilli(converter.getmilliseconds(item.getitunesduration())); if (mlistener != null) { mlistener.ontrackclicked(track); } } }); holder.mepisoderl.setonclicklistener(new view.onclicklistener() { @override public void onclick(view v) { displaybottomsheet(item); } }); }