A quiz app + more than 10 screens

Hello everyone,
I have an issue and I hope you can help me out.
I want to create a quiz app and it will be an MCQ one, so I need to put a question in each screen, which means I will create over 200 screens. Is it possible? because I knew that the advisable limit is 10 screens.
please advise.

Welcome Mahmoud,

Screens take up a lot of resources. If your app uses more than 10 screens, it will probably crash.

This is a demo of how I will do the same app with only 2 screens.

Screen1

I make a dictionary of questions as the key and the answer as the value. I add a ListView for the user to select a question and I set the Elements of the ListView to the keys of the dictionary of questions. When the user selects an item, the app will direct to Screen2 with a list of the question and the suitable answer.

Screen2

I add Label1 to show the question and a TextBox for the user to input their answer.

This might be a little tricky, so I advice you to read the following articles and/or watch the YouTube video.

3 Likes

Thanks a lot. This is of great help. I think I need to study more about these features because I'm still a newcomer. Can't thank you enough.

1 Like

in this example quiz you can add as many questions as you like and it uses only one screen

Taifun

2 Likes

Two Screens only!!! as @Gordon_Lu is eluding
Use WebViewer and write questions into a list to be shown by the WebViewer.
Simple HTML and you can make hundreds of questions and answers without using up hardly any resources.

Perfectly great method for university exams if coupled to BlueTooth

1 Like

I've got some code right here that may help.

For the app you are creating, there would be a lot more code but for the example above there are 4 questions.


The 4 questions are all put inside of vertical arrangements so that everything can be A: a little more organized and B: less code to keep track of.

What the code does is it starts the game on the first question (this could be changed with a save code system if you want). The game only checks an answer when the button for that question is pressed. If there is nothing in the text box, it nicely asks the player to insert an answer to the question. If there is something inside of the text box, it checks to see if the answer is correct or not, only moving on to the next question if the answer is correct.

1 Like

The question is that the OP has 200 questions. If you put 200 layouts in 1 screen, I don't think it is a good idea.

2 Likes

Thanks a lot. This is great

I also think so. Thanks

okay thanks

This is also a good one. Thanks a lot

@Mahmoud_Elbanna here you go for a MCQ (multiple Choice Quiz)
All you need do is make CSV rows of Question,Answer,possible1,possible2 - possible 6

MultipleChoiceTest.aia (14.2 KB)

NOTE: sure do wish there was an easier way to reset multiple check boxes, labels, textboxes, etc
Arrays of such objects, like a list of objects, and just Set Label(index).visible=false or something would be nice

1 Like

You could always add the components to a list and iterate over them in a for loop.

Exactly what I would like. Components to a list? can you give me an example?

2 Likes

Thank You so much @ABG . I had no idea this could be done and I definately will make use of this in the future. powerful .. do more with less coding .. gotta love it