Scrolling activity after ListView

First of all, sorry for the terrible question.

I have a custom ListView filled with questions that are parsed from an XML file. after clicking on one of the questions, a new action begins with the possibility of answering the question. questions have different types of answers, such as plain text, multiple choice, slider ... each type of answer has activity. After answering questions, the user clicks the oky button and returns to the ListView.

it still works

however, I would like to add swiping. the user clicks on a question in the ListView, answers it, and can go to the next question or to the previous one.

What is the best way to implement this? save my actions in response and use a gesture sensor to switch between them? converting my response actions to fragments and using ViewPager?

EDIT: The big problem, probably, is that the questions and therefore the types of answers (actions) are always different, not static.

+3
source share
1 answer

Why don't you create an ArrayList from the intentions that will be used, and call actions based on these intentions, add the intentions to the ArrayList when populating the ListView

0
source

All Articles