0

I'm new to Android and I need some help on how to create a Quiz layout for my app.

I currently have a Quiz object with a list of Questions. Each question has a type which can be: Single Line, Single Choice, Multiple Choice, YesNo, TrueFalse.

I've been doing some research and I've found that there are a couple of UI components that might help me:

ViewPager

ViewFlipper

ViewSwitcher

So I was planning on creating a template for each question type and then load them dynamically for each question in the Quiz.

Any ideas?

2 Answers2

0

You need checkboxes, as well as lists. Depending on the type of the question, you could design individual views/fragments.

Each answer could be a list element. Look, how lists are inflated using an adapter. Design your list element seperately.

If you have a fixed and limited length of answers, you also can make a static layout with answer possibilities. For each type there should be one layout xml-file.

redestructa
  • 1,182
  • 1
  • 11
  • 11
0

The guy in this book "Sam's Teach Yourself Android Application Development in 24 Hours, Second Edition" develop Trivia. The link below is to book source code which you can download and examine the structure http://androidbook.blogspot.co.uk/p/book-code-downloads.html

Radoslav
  • 1,446
  • 1
  • 16
  • 30