public void removeAllItemDecoration() { for (RecyclerView.ItemDecoration decoration : decorations) { mRecycler.removeItemDecoration(decoration); } }
public void removeItemDecoration(RecyclerView.ItemDecoration itemDecoration) { mRecycler.removeItemDecoration(itemDecoration); }
private void updateLayoutManager(int column) { recyclerView.removeItemDecoration(itemDecoration); recyclerView.setAdapter(new PlaylistAdapter(getActivity(), PlaylistLoader.getPlaylists(getActivity(), showAuto))); layoutManager.setSpanCount(column); layoutManager.requestLayout(); setItemDecoration(); }
mLayoutManager.setStrategy(AutoStaggeredGridLayoutManager.STRATEGY_MIN_SIZE); if (null != mGirdDecoration) { recyclerView.removeItemDecoration(mGirdDecoration); mLayoutManager.setStrategy(AutoStaggeredGridLayoutManager.STRATEGY_SUITABLE_SIZE); if (null != mListDecoration) { recyclerView.removeItemDecoration(mListDecoration);
@OnUnmount static void onUnmount( ComponentContext context, SectionsRecyclerView sectionsRecycler, @Prop Binder<RecyclerView> binder, @Prop(optional = true) RecyclerView.ItemDecoration itemDecoration, @Prop(optional = true, resType = ResType.COLOR) @Nullable Integer refreshProgressBarBackgroundColor, @Prop(optional = true) SnapHelper snapHelper) { final RecyclerView recyclerView = sectionsRecycler.getRecyclerView(); if (recyclerView == null) { throw new IllegalStateException( "RecyclerView not found, it should not be removed from SwipeRefreshLayout " + "before unmounting"); } recyclerView.setId(RecyclerSpec.recyclerViewId); if (refreshProgressBarBackgroundColor != null) { sectionsRecycler.setProgressBackgroundColorSchemeColor( DEFAULT_REFRESH_SPINNER_BACKGROUND_COLOR); } if (itemDecoration != null) { recyclerView.removeItemDecoration(itemDecoration); } binder.unmount(recyclerView); if (snapHelper != null) { snapHelper.attachToRecyclerView(null); } }
recyclerView.removeItemDecoration(itemDecoration); if (lSCell.hGap > 0) { itemDecoration = new RecyclerView.ItemDecoration() {
recyclerView.removeItemDecoration(itemDecoration); if (lSCell.hGap > 0) { itemDecoration = new RecyclerView.ItemDecoration() {
public final void clearHeaderDecoration() { if (decoration != null) { recyclerView.removeItemDecoration(decoration); decoration = null; } }
@Override protected void initViews() { mSwipeToLoadLayout.setOnRefreshListener(this); mSwipeToLoadLayout.setOnLoadMoreListener(this); mMultipleStatusView.setOnRetryClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (CommonUtils.isFastDoubleClick()) { return; } onRefresh(); } }); commonAdapter = new CommonAdapter<T>(getActivity(), getItemLayout(), list) { @Override public void convert(ViewHolder holder, T t, int position) { fillValue(holder, t, position); } }; mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity())); mRecyclerView.setHasFixedSize(false); headerAndFooterWrapper = new HeaderAndFooterWrapper(commonAdapter); SlideInBottomAnimationAdapter slideInBottomAnimationAdapter = new SlideInBottomAnimationAdapter(headerAndFooterWrapper); slideInBottomAnimationAdapter.setFirstOnly(true); mRecyclerView.setAdapter(slideInBottomAnimationAdapter); mRecyclerView.removeItemDecoration(decoration); mRecyclerView.addItemDecoration(decoration); onRefresh(); }
public void setDisableDecoration(boolean disableDecoration) { this.disableDecoration = disableDecoration; if (recyclerView != null && mHorDividerDecoration != null && disableDecoration) { recyclerView.removeItemDecoration(mHorDividerDecoration); } }
public final void clearHeaderDecoration() { if (decoration != null) { recyclerView.removeItemDecoration(decoration); decoration = null; } }
public final void clearHeaderDecoration() { if (decoration != null) { recyclerView.removeItemDecoration(decoration); decoration = null; } }
public final void clearHeaderDecoration() { if (decoration != null) { recyclerView.removeItemDecoration(decoration); decoration = null; } }
public void setItemDecoration(RecyclerView.ItemDecoration itemDecoration) { rv.removeItemDecoration(this.itemDecoration); this.itemDecoration = itemDecoration; if (this.itemDecoration != null) { rv.addItemDecoration(this.itemDecoration); } }
@Override public void onDetachedFromRecyclerView(RecyclerView recyclerView) { if (recyclerView != null && mHorDividerDecoration != null) { recyclerView.removeItemDecoration(mHorDividerDecoration); } super.onDetachedFromRecyclerView(recyclerView); }
/** * Remove an {@link RecyclerView.ItemDecoration} from wrapped RecyclerView. * <p> * <p>The given decoration will no longer impact the measurement and drawing of * item views.</p> * * @param decor Decoration to remove * @see #addItemDecoration(RecyclerView.ItemDecoration) */ @SuppressWarnings("unused") public final void removeItemDecoration(RecyclerView.ItemDecoration decor) { getRvCategories().removeItemDecoration(decor); }
@Override public void removeHeader() { if (mRootHeader != null) { getRecyclerView().removeItemDecoration(mRootHeader); mRootHeader = null; } if(mHeader != null){ mRootRelativeLayout.removeView(mHeader); mHeader = null; } }
private void setHorizontalMode() { if (mCurrentItemDecoration != null) mRecyclerView.removeItemDecoration(mCurrentItemDecoration); RecyclerViewStyleHelper.toLinearLayout(mRecyclerView, LinearLayout.VERTICAL); mCurrentItemDecoration = new RecyclerViewSpaceItemDecoration.Builder(this) .margin(10) .create(); mRecyclerView.addItemDecoration(mCurrentItemDecoration); }
private void setGridMode() { if (mCurrentItemDecoration != null) mRecyclerView.removeItemDecoration(mCurrentItemDecoration); RecyclerViewStyleHelper.toGridView(mRecyclerView, 4); mCurrentItemDecoration = new RecyclerViewSpaceItemDecoration.Builder(this) //if horizontal and vertical spacing is the same size,just use margin(int size) // .margin(10) .marginHorizontal(10) .marginVertical(20) .create(); mRecyclerView.addItemDecoration(mCurrentItemDecoration); }
private void updateLayoutManager(int column) { recyclerView.removeItemDecoration(itemDecoration); recyclerView.setAdapter(new AlbumAdapter(getActivity(), AlbumLoader.getAllAlbums(getActivity()))); layoutManager.setSpanCount(column); layoutManager.requestLayout(); setItemDecoration(); }