I need to swipe horizontally between list of questions and their respective choices in a radio group. I have read that I have different choices such as: 1- Gesture Detector 2- ViewPage 3- ViewPage with fragments
I have tried ViewPage but I am facing different problems on how to swipe backward and indicating which choice has been checked by the user. I need to use the easiest way to swipe forward and backward (indicating which choice has been checked)
I want to depend on Andriod methods as much as possible without storing the checked choices for example by myself since I believe that it is more optimized such methods from both run-time or code size. Please if there are other classes that I can use, guide me on that or which of them is really the best to perform my target
I would use ViewPager with a FragmentPagerAdapter. The items of the adapter would be different instances of the same fragment. Each fragment would contain a static question text and a radio group of possible answers to the question.
ViewPager then will take care of swiping substituting one such fragment with another.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With