Advertisement
Guest User

Untitled

a guest
Mar 29th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. linearLayoutManager = new LinearLayoutManager(mContext, LinearLayoutManager.HORIZONTAL, false);
  2. this.recyclerView.setLayoutManager(linearLayoutManager);
  3. SnapHelper snapHelper = new PagerSnapHelper();
  4. adapterCarousel = new AdapterCarousel(mContext, glideRequestManager);
  5. adapterCarousel.setViewType(RECYCLER_VIEW_TYPE_NORMAL);
  6. adapterCarousel.setCarousel(carousel);
  7. this.recyclerView.setAdapter(adapterCarousel);
  8. snapHelper.attachToRecyclerView(recyclerView);
  9. linearLayoutManager.scrollToPosition(Integer.MAX_VALUE / 2);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement