1

I am new to Android. I have a recyclerview with LinearLayoutmanager set to enable horizontal scroll. I would like user not scroll beyond certain point which can change dynamically.

I will give a example to describe it. Lets say there is a tutorial app which presents user 5 questions at the end of chapter. Lets say those 5 questions are presented in recycler view.

User should not be able to scroll beyond first un-completed question. So if user has completed first 2 questions then recyclerview should not allow scrolling beyond third question although user can scroll back to first & second completed question.

user4231878
  • 45
  • 1
  • 4
  • Possible duplicate of [How to disable RecyclerView scrolling?](http://stackoverflow.com/questions/30531091/how-to-disable-recyclerview-scrolling) – basic Jul 14 '16 at 12:55

2 Answers2

1

Initially add only one question in your recycleView adapter. If user completes that question then update your adapter with second question.

chetan
  • 681
  • 4
  • 21
0

You can make that remaining questions which should not be accessed as invisible and make them visible when they answer the previous questions.

muthuraj
  • 1,033
  • 15
  • 22