简体   繁体   中英

Swiping activities after ListView

first of all, sorry for the awful question title.

i have a custom ListView filled with questions which are parsed from a xml file. after clicking one of the questions, a new activity is started with the possibility to answer the question. the questions have different types of answers like open text, multiple choice, slider... every answer type has an activity. after answering the questions, the user presses the okay button and returns to the ListView.

this works so far

however, i would like to add swiping. the user clicks a question in the ListView, answers it and can swipe to the next question or the one before.

what is the best way to implement that? keeping my answer activities and use gesture detector to switch between them? converting my answer activities into fragments and use a ViewPager?

EDIT: a big problem is probably that the questions and therefore the answer types (activies) are always different and not static.

为什么不创建要使用的Intents的ArrayList并根据这些意图调用Activities,在填充ListView时向ArrayList添加意图

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM