Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void onBindViewHolder(final TabFragment1.SimpleItemRecyclerViewAdapter.ViewHolder holder, int position) {
- holder.mItem = mValues.get(position);
- holder.mIdView.setText(mValues.get(position).title);
- holder.mContentView.setText(mValues.get(position).description);
- if (holder.mThumbnail == null) {
- System.out.println("thumbnail null"); //NEVER gets called
- } else {
- if(mValues.get(position).thumbnailData!=null){
- System.out.println("thumbnailData contained"); //NEVER GETS CALLED, IT ALWAYS SEEMS TO BE NUL
- holder.mThumbnail.setImageDrawable(mValues.get(position).thumbnailData);
- } else {
- System.out.println("thumbnailData downloading"); //always happening
- try {
- AsyncTask<String, Void, Bitmap> execute = new DownloadImageTask((ImageView) holder.mThumbnail)
- .execute(holder.mItem.thumbnailUrl);
- mValues.get(position).thumbnailData = holder.mThumbnail.getDrawable();
- if(mValues.get(position).thumbnailData!=null) {
- System.out.println("is null"); //hardly ever gets printed
- } else {
- System.out.println("is not null"); //always gets printed
- }
- } catch (Exception ex) {
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement