Java Code Examples for android.support.v7.widget.RecyclerView#RecyclerListener

The following examples show how to use android.support.v7.widget.RecyclerView#RecyclerListener . 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: BaseGridView.java    From TvRecyclerView with Apache License 2.0 6 votes vote down vote up
public BaseGridView(Context context, AttributeSet attrs, int defStyle) {
    super(context, attrs, defStyle);
    mLayoutManager = getLayoutManager();
    setLayoutManager(mLayoutManager);
    setDescendantFocusability(FOCUS_AFTER_DESCENDANTS);
    setHasFixedSize(true);
    setChildrenDrawingOrderEnabled(true);
    setWillNotDraw(true);
    setOverScrollMode(View.OVER_SCROLL_NEVER);

    super.setRecyclerListener(new RecyclerView.RecyclerListener() {
        @Override
        public void onViewRecycled(RecyclerView.ViewHolder holder) {
            if (mChainedRecyclerListener != null) {
                mChainedRecyclerListener.onViewRecycled(holder);
            }
        }
    });
}
 
Example 2
Source File: BaseAdapter.java    From NIM_Android_UIKit with MIT License 5 votes vote down vote up
@Override
public void onViewRecycled(@NonNull BaseViewHolder holder) {
    super.onViewRecycled(holder);
    if (holder instanceof RecyclerView.RecyclerListener) {
        ((RecyclerView.RecyclerListener) holder).onViewRecycled(holder);
    }
}
 
Example 3
Source File: RecyclerWidget.java    From relight with Apache License 2.0 4 votes vote down vote up
public RecyclerWidget<V> recyclerListener(@Nullable RecyclerView.RecyclerListener listener) {
    view.setRecyclerListener(listener);
    return self();
}
 
Example 4
Source File: BaseGridView.java    From TvRecyclerView with Apache License 2.0 4 votes vote down vote up
@Override
public void setRecyclerListener(RecyclerView.RecyclerListener listener) {
    mChainedRecyclerListener = listener;
}
 
Example 5
Source File: HTBaseRecyclerView.java    From ht-refreshrecyclerview with MIT License 4 votes vote down vote up
@Override
public void setRecyclerListener(RecyclerView.RecyclerListener listener) {
    mRecyclerView.setRecyclerListener(listener);
}
 
Example 6
Source File: HTRefreshRecyclerView.java    From ht-refreshrecyclerview with MIT License 4 votes vote down vote up
@Override
public void setRecyclerListener(RecyclerView.RecyclerListener listener) {
    mRecyclerViewProxy.setRecyclerListener(listener);
}
 
Example 7
Source File: RecyclerViewv7DSL.java    From anvil with MIT License 4 votes vote down vote up
public static Void recyclerListener(RecyclerView.RecyclerListener arg) {
  return BaseDSL.attr("recyclerListener", arg);
}
 
Example 8
Source File: HTRefreshRecyclerViewInterface.java    From ht-refreshrecyclerview with MIT License 2 votes vote down vote up
/**
 * 设置{@link RecyclerView.RecyclerListener}对象,当view被回收时回调该方法<br/>
 * 详细描述{@link RecyclerView#setRecyclerListener(RecyclerView.RecyclerListener)}
 * @param listener view回收事件监听对象
 */
void setRecyclerListener(RecyclerView.RecyclerListener listener);
 
Example 9
Source File: IRecyclerView.java    From tenor-android-core with Apache License 2.0 votes vote down vote up
void setRecyclerListener(RecyclerView.RecyclerListener listener);