use of org.wikipedia.views.MarginItemDecoration in project apps-android-wikipedia by wikimedia.
the class FeedView method init.
private void init() {
setVerticalScrollBarEnabled(true);
recyclerLayoutManager = new StaggeredGridLayoutManager(getColumns(), StaggeredGridLayoutManager.VERTICAL);
setItemAnimator(new FeedItemAnimator());
setLayoutManager(recyclerLayoutManager);
addItemDecoration(new MarginItemDecoration(getContext(), R.dimen.view_list_card_margin_horizontal, R.dimen.view_list_card_margin_vertical, R.dimen.view_list_card_margin_horizontal, R.dimen.view_list_card_margin_vertical));
addItemDecoration(new HeaderMarginItemDecoration(getContext(), R.dimen.view_feed_padding_top, R.dimen.view_feed_search_padding_bottom));
setCallback(new RecyclerViewColumnCallback());
setClipChildren(false);
}
use of org.wikipedia.views.MarginItemDecoration in project apps-android-wikipedia by wikimedia.
the class OnThisDayFragment method setUpRecycler.
private void setUpRecycler(RecyclerView recycler) {
recycler.addItemDecoration(new MarginItemDecoration(requireContext(), R.dimen.view_horizontal_scrolling_list_card_item_margin_horizontal, R.dimen.view_horizontal_scrolling_list_card_item_margin_vertical, R.dimen.view_horizontal_scrolling_list_card_item_margin_horizontal, R.dimen.view_horizontal_scrolling_list_card_item_margin_vertical));
recycler.addOnItemTouchListener(new DontInterceptTouchListener());
recycler.setNestedScrollingEnabled(true);
recycler.setClipToPadding(false);
}
Aggregations