开发者

How to combine lists in an Android quiz app

So I'm making a quiz show app for school (Android), and what I am planning is that the user can select, using a checklist, what chapters he wants to be quizzed on.

Using only one list per chapter, it is easy to make a quiz by chapter, but let's say I check the boxes chapter 3,4 and 6. How do I combine those lists with the questions so that the app will have a quiz with all those questions in those chapters.

I am planning to have around 15 chapters, so 15 checkboxes with 15C14 possibilites of ways of choosing the chapters. How would I put that in programming language so that it shows the questions of the开发者_JS百科 ticked chapters?

Also, is there a way to randomize the questions in a list when it is put out as questions?


Karan,

It looks like you want to be using a MergeCursor shown here: http://developer.android.com/reference/android/database/MergeCursor.html

You can use this to combined the checked chapters into a single Cursor then use an Adapter to display the single list.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜