is called when the ViewHolder is in a transient state. return true if you want to reuse
that view anyways

@param holder the viewHolder for the view which failed to recycle
@return true if we want to recycle anyways (false - it get's destroyed)
334801
@Override
    public boolean onFailedToRecycleView(RecyclerView.ViewHolder holder) {
        if (mVerbose) Log.v(TAG, "onFailedToRecycleView: " + holder.getItemViewType());
        return mOnBindViewHolderListener.onFailedToRecycleView(holder, holder.getAdapterPosition()) || super.onFailedToRecycleView(holder);
    }
433393
@Override
	public void onBindViewHolder(ViewHolder viewHolder, final int position) {
		if (jarr == null) return;
		Log.d(TAG, "Element " + position + " set.");
		// Get element from your dataset at this position and replace the contents of the view
		// with that element
		Log.d("jus", jarr.get(position).asJsonObject().getString("imageUrl"));

		viewHolder.niv.setImageUrl(jarr.get(position).asJsonObject().getString("imageUrl"),
				imageLoader);
		viewHolder.title.setText(jarr.get(position).asJsonObject().getString("title"));
		viewHolder.author.setText(jarr.get(position).asJsonObject().getString("author"));
		viewHolder.views.setText(jarr.get(position).asJsonObject().getInt("views").toString());
		viewHolder.favorites.setText(jarr.get(position).asJsonObject().getInt("favorites")
				.toString());


	}
603974
@Override
    public void onBindViewHolder(RecyclerView.ViewHolder holder, int position, List payloads) {
        if (shouldInsertItemAtPosition(position)) {
            getItem(position).bindView(holder, payloads);
        } else {
            mAdapter.onBindViewHolder(holder, position - itemInsertedBeforeCount(position), payloads);
        }
    }
1070556
@Override
    public void unBindViewHolder(RecyclerView.ViewHolder viewHolder, int position) {
        IItem item = FastAdapter.getHolderAdapterItemTag(viewHolder);
        if (item != null) {
            item.unbindView(viewHolder);
            if (viewHolder instanceof FastAdapter.ViewHolder) {
                ((FastAdapter.ViewHolder) viewHolder).unbindView(item);
            }
            //remove set tag's
            viewHolder.itemView.setTag(R.id.fastadapter_item, null);
            viewHolder.itemView.setTag(R.id.fastadapter_item_adapter, null);
        } else {
            Log.e("FastAdapter", "The bindView method of this item should set the `Tag` on its itemView (https://github.com/mikepenz/FastAdapter/blob/develop/library-core/src/main/java/com/mikepenz/fastadapter/items/AbstractItem.java#L189)");
        }
    }
821810
@Restricted(NoExternalUse.class) // called from newJob_button-bar view
    @SuppressWarnings("unused") // called from newJob_button-bar view
    public boolean isAddToCurrentView() {
        synchronized(this) {
            return !jobNames.isEmpty() || // There are already items in this view specified by name
                    (jobFilters.isEmpty() && includePattern == null) // No other way to include items is used
                    ;
        }
    }
1127211
@Nullable
    ViewHolder popRecycledViewHolder(int itemType) {
        Deque<ViewHolder> deque = mViewHolders.get(itemType);
        return deque == null || deque.isEmpty() ? null : deque.pop();
    }
951201
public boolean onDelete()
    {
        Record record = this.getMainRecord();
        if (record == null)
            return false;

        if (record.getEditMode() == Constants.EDIT_NONE)
            return true;
        if (record.getEditMode() == Constants.EDIT_ADD)
        {   // If they're adding, can't delete nothing!
            this.onRefresh();
            return true;
        }
        try {
            if (record.getEditMode() != Constants.EDIT_IN_PROGRESS)
                record.edit();
            record.remove();
            record.addNew();
            this.clearStatusText();
        } catch(DBException ex) {
            this.displayError(ex);
            return false;
        }
        return true;
    }
1003264
public void addServletHolder(ServletHolder holder)
    {
        ServletHolder existing = (ServletHolder)
        _nameMap.get(holder.getName());
        if (existing==null)
            _nameMap.put(holder.getName(),holder);
        else if (existing!=holder)
            throw new IllegalArgumentException("Holder already exists for name: "+holder.getName());
        addComponent(holder);
    }
29985
@Override
    @SuppressWarnings("unchecked")
    public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        if (mVerbose) Log.v(TAG, "onCreateViewHolder: " + viewType);

        final RecyclerView.ViewHolder holder = mOnCreateViewHolderListener.onPreCreateViewHolder(this, parent, viewType);

        //set the adapter
        holder.itemView.setTag(R.id.fastadapter_item_adapter, FastAdapter.this);

        if (mAttachDefaultListeners) {
            //handle click behavior
            EventHookUtil.attachToView(fastAdapterViewClickListener, holder, holder.itemView);

            //handle long click behavior
            EventHookUtil.attachToView(fastAdapterViewLongClickListener, holder, holder.itemView);

            //handle touch behavior
            EventHookUtil.attachToView(fastAdapterViewTouchListener, holder, holder.itemView);
        }

        return mOnCreateViewHolderListener.onPostCreateViewHolder(this, holder);
    }
961384
public boolean voteDown(ParaObject obj, String voterid) {
		if (obj == null || StringUtils.isBlank(voterid)) {
			return false;
		}
		return getEntity(invokePatch(obj.getType().concat("/").concat(obj.getId()),
				Entity.json(Collections.singletonMap("_votedown", voterid))), Boolean.class);
	}
59271
protected void onMoveCanceled(ViewHolder holder) {
        ViewCompat.setTranslationX(holder.itemView, 0);
        ViewCompat.setTranslationY(holder.itemView, 0);
    }
234282
private Holder createHolder() {
        poll();
        Holder holder = new Holder(queue);
        WeakReference<Holder> ref = new WeakReference<>(holder);

        Holder old;
        do {
            old = strongRefs;
            holder.next = old;
        } while (!strongRefsUpdater.compareAndSet(this, old, holder));

        local.set(ref);
        return holder;
    }
1025912
private void recycleViewHolders(boolean isRecycleAll) {

        if (mAdapter == null) {
            return;
        }

        final List<Integer> headerKeysToRemove = new ArrayList<>();

        // item view holders
        for (ViewHolder holder : mViewHolders.getAll()) {
            if (holder != null && !holder.isDragging()) {
                View view = holder.getItemView();
                // recycle view holder
                if (isRecycleAll
                        || (view.getRight() < 0
                        || view.getLeft() > mSettings.getLayoutWidth()
                        || view.getBottom() < 0
                        || view.getTop() > mSettings.getLayoutHeight())) {
                    // recycle view holder
                    mViewHolders.remove(holder.getRowIndex(), holder.getColumnIndex());
                    recycleViewHolder(holder);
                }
            }
        }
        if (!headerKeysToRemove.isEmpty()) {
            headerKeysToRemove.clear();
        }
        // column header view holders
        for (int count = mHeaderColumnViewHolders.size(), i = 0; i < count; i++) {
            int key = mHeaderColumnViewHolders.keyAt(i);
            // get the object by the key.
            ViewHolder holder = mHeaderColumnViewHolders.get(key);
            if (holder != null) {
                View view = holder.getItemView();
                // recycle view holder
                if (isRecycleAll
                        || view.getRight() < 0
                        || view.getLeft() > mSettings.getLayoutWidth()) {
                    headerKeysToRemove.add(key);
                    recycleViewHolder(holder);
                }
            }
        }

        removeKeys(headerKeysToRemove, mHeaderColumnViewHolders);

        if (!headerKeysToRemove.isEmpty()) {
            headerKeysToRemove.clear();
        }
        // row header view holders
        for (int count = mHeaderRowViewHolders.size(), i = 0; i < count; i++) {
            int key = mHeaderRowViewHolders.keyAt(i);
            // get the object by the key.
            ViewHolder holder = mHeaderRowViewHolders.get(key);
            if (holder != null && !holder.isDragging()) {
                View view = holder.getItemView();
                // recycle view holder
                if (isRecycleAll
                        || view.getBottom() < 0
                        || view.getTop() > mSettings.getLayoutHeight()) {
                    headerKeysToRemove.add(key);
                    recycleViewHolder(holder);
                }
            }
        }

        removeKeys(headerKeysToRemove, mHeaderRowViewHolders);
    }
100022
public static boolean applyTo(ImageHolder imageHolder, ImageView imageView, String tag) {
        if (imageHolder != null && imageView != null) {
            return imageHolder.applyTo(imageView, tag);
        }
        return false;
    }
859883
public static boolean hasUniqueObject(Collection<?> collection) {
        if (isEmpty(collection)) {
            return false;
        }
        boolean hasCandidate = false;
        Object candidate = null;
        for (Object elem : collection) {
            if (!hasCandidate) {
                hasCandidate = true;
                candidate = elem;
            } else if (candidate != elem) {
                return false;
            }
        }
        return true;
    }
696740
public boolean onRefresh()
    {
        Record record = this.getMainRecord();
        if (record == null)
            return false;

        try
        {
            if (record.getEditMode() == Constants.EDIT_IN_PROGRESS)
            {   // If they're adding, can't delete nothing!
                if (record.isRefreshedRecord())
                    return this.onDelete();
                Object bookmark = record.getHandle(DBConstants.BOOKMARK_HANDLE);
                record.setHandle(bookmark, DBConstants.BOOKMARK_HANDLE);
            }
            if (record.getEditMode() == Constants.EDIT_ADD)
                record.addNew();
            this.clearStatusText();
        } catch (DBException ex) {
            this.displayError(ex);
            return false;
        }
        return true;
    }
1090744
private void recyclePreviousSlideView(int position, View view) {
        // Remove view from our hierarchy
        removeView(view);

        // Add to recycled views
        int viewType = adapter.getItemViewType(position);
        recycledViews.put(viewType, view);
        view.destroyDrawingCache();

        if (view instanceof ImageView) {
            ((ImageView) view).setImageDrawable(null);
        }

        Log.d("SlideShowView", "View added to recycling bin: " + view);

        // The adapter can recycle some memory with discard slide
        adapter.discardSlide(position);

        // The adapter can prepare the next slide
        prepareSlide(getPlaylist().getNextSlide());
    }