use of org.wikipedia.views.DontInterceptTouchListener in project apps-android-wikipedia by wikimedia.
the class HorizontalScrollingListCardView method initRecycler.
@Override
protected void initRecycler(@NonNull RecyclerView recyclerView) {
recyclerView.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.HORIZONTAL, false));
recyclerView.addItemDecoration(new MarginItemDecoration(getContext(), 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));
recyclerView.addOnItemTouchListener(new DontInterceptTouchListener());
recyclerView.setNestedScrollingEnabled(false);
recyclerView.setClipToPadding(false);
MarginLayoutParams params = (MarginLayoutParams) recyclerView.getLayoutParams();
final int height = DimenUtil.roundedDpToPx(228);
params.height = height;
final int padding = DimenUtil.roundedDpToPx(12);
recyclerView.setPadding(padding, 0, padding, 0);
}
use of org.wikipedia.views.DontInterceptTouchListener in project apps-android-wikipedia by wikimedia.
the class OnThisDayCardView method initRecycler.
private void initRecycler() {
pagesRecycler.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.HORIZONTAL, false));
pagesRecycler.addItemDecoration(new MarginItemDecoration(getContext(), 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));
pagesRecycler.addOnItemTouchListener(new DontInterceptTouchListener());
pagesRecycler.setNestedScrollingEnabled(false);
}
use of org.wikipedia.views.DontInterceptTouchListener 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