Attaches this {@link Snackbar} to a RecyclerView so it dismisses when the list is scrolled

@param recyclerView The RecyclerView instance to attach to.
@return
497563
public Snackbar attachToRecyclerView(View recyclerView) {

        try {
            Class.forName("android.support.v7.widget.RecyclerView");

            // We got here, so now we can safely check
            RecyclerUtil.setScrollListener(this, recyclerView);
        } catch (ClassNotFoundException ignored) {
            throw new IllegalArgumentException("RecyclerView not found. Did you add it to your dependencies?");
        }

        return this;
    }
469052
public SwipeViewGroup setContentView(View contentView){
        if(this.contentView != null) removeView(contentView);
        addView(contentView);
        this.contentView = contentView;

        return this;
    }
34714
public <T extends View> ViewGroup getRecyclerView(int recyclerViewIndex, int timeOut) {
		final long endTime = SystemClock.uptimeMillis() + timeOut;

		while (SystemClock.uptimeMillis() < endTime) {
			View recyclerView = getRecyclerView(true, recyclerViewIndex);
			if(recyclerView != null){
				return (ViewGroup) recyclerView;
			}
		}
		return null;
	}
349708
@NonNull
  @SuppressWarnings("WeakerAccess")
  public SnackbarWrapper setText(@NonNull CharSequence message) {
    snackbar.setText(message);
    return this;
  }
553247
public boolean scrollDownRecyclerView(int index) {
		if(config.commandLogging){
			Log.d(config.commandLoggingTag, "scrollDownRecyclerView("+index+")");
		}
		
		if(!config.shouldScroll) {
			return true;
		}
		
		View recyclerView = viewFetcher.getRecyclerView(index, Timeout.getSmallTimeout());
	
		return scroller.scrollView(recyclerView, Scroller.DOWN);
		
	}
207405
public void registerSnackbarContainer(Pane snackbarContainer) {
        if (snackbarContainer != null) {
            if (this.snackbarContainer != null) {
                //since listeners are added the container should be properly registered/unregistered
                throw new IllegalArgumentException("Snackbar Container already set");
            }
            this.snackbarContainer = snackbarContainer;
            this.snackbarContainer.getChildren().add(this);
            this.snackbarContainer.heightProperty().addListener(weakSizeListener);
            this.snackbarContainer.widthProperty().addListener(weakSizeListener);
        }
    }
555646
public SwipeActionAdapter setListView(ListView listView){
        this.mListView = listView;
        mTouchListener = new SwipeActionTouchListener(listView,this);
        this.mListView.setOnTouchListener(mTouchListener);
        this.mListView.setOnScrollListener(mTouchListener.makeScrollListener());
        this.mListView.setClipChildren(false);
        mTouchListener.setFadeOut(mFadeOut);
        mTouchListener.setDimBackgrounds(mDimBackgrounds);
        mTouchListener.setFixedBackgrounds(mFixedBackgrounds);
        mTouchListener.setNormalSwipeFraction(mNormalSwipeFraction);
        mTouchListener.setFarSwipeFraction(mFarSwipeFraction);
        return this;
    }
711717
@SuppressWarnings({"WeakerAccess", "unused"}) // For library users
    public void enableKeyboardAutoHiding() {
        keyboardListener = new OnScrollListener() {
            @Override
            public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
                if (dx != 0 || dy != 0) {
                    imeManager.hideSoftInputFromWindow(
                            Hits.this.getWindowToken(),
                            InputMethodManager.HIDE_NOT_ALWAYS);
                }
                super.onScrolled(recyclerView, dx, dy);
            }
        };
        addOnScrollListener(keyboardListener);
    }
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);
    }
122570
@Override
    public void onViewDetachedFromWindow(RecyclerView.ViewHolder viewHolder, int position) {
        IItem item = FastAdapter.getHolderAdapterItemTag(viewHolder);
        if (item != null) {
            item.detachFromWindow(viewHolder);
            if (viewHolder instanceof FastAdapter.ViewHolder) {
                ((FastAdapter.ViewHolder) viewHolder).detachFromWindow(item);
            }
        }
    }
1309954
protected void setUpRecyclerView(DatePickerDialog.ScrollOrientation scrollOrientation) {
        setVerticalScrollBarEnabled(false);
        setFadingEdgeLength(0);
        int gravity = scrollOrientation == DatePickerDialog.ScrollOrientation.VERTICAL
                ? Gravity.TOP
                : Gravity.START;
        GravitySnapHelper helper = new GravitySnapHelper(gravity, position -> {
            // Leverage the fact that the SnapHelper figures out which position is shown and
            // pass this on to our PageListener after the snap has happened
            if (pageListener != null) pageListener.onPageChanged(position);
        });
        helper.attachToRecyclerView(this);
    }
1139985
@Override
    @UiThread
    public void onDetachedFromRecyclerView(@NonNull RecyclerView recyclerView) {
        super.onDetachedFromRecyclerView(recyclerView);
        mAttachedRecyclerViewPool.remove(recyclerView);
    }
718081
@NonNull
  @SuppressWarnings("WeakerAccess")
  public SnackbarWrapper setBackgroundColorRes(@ColorRes int color) {
    getView().setBackgroundColor(ContextCompat.getColor(context, color));
    return this;
  }
663968
@Override
  public void onDismissed(Snackbar snackbar, @DismissEvent int event) {
    if (callback != null) {
      callback.onDismissed(snackbar, event);
    }
  }
1171461
@NonNull
  @SuppressWarnings("WeakerAccess")
  public SnackbarWrapper setActionTextColorRes(@ColorRes int color) {
    snackbar.setActionTextColor(ContextCompat.getColor(context, color));
    return this;
  }
303514
public void onViewRecycled(@NonNull RecyclerView.ViewHolder holder) {
        AdapterDelegate<T> delegate = getDelegateForViewType(holder.getItemViewType());
        if (delegate == null) {
            throw new NullPointerException("No delegate found for "
                    + holder
                    + " for item at position = "
                    + holder.getAdapterPosition()
                    + " for viewType = "
                    + holder.getItemViewType());
        }
        delegate.onViewRecycled(holder);
    }
430185
public LinearLayoutManager asHorizontalListView() {
        this.presentation = PeasyPresentation.HorizontalList;
        final LinearLayoutManager layoutManager = PeasyRecyclerView.HorizontalList.newLayoutManager(getContext());
        getRecyclerView().setLayoutManager(layoutManager);
        getRecyclerView().addItemDecoration(new DividerItemDecoration(getContext(), layoutManager.getOrientation()));
        getRecyclerView().setItemAnimator(new DefaultItemAnimator());
        return layoutManager;
    }