1
I am developing an educational application (with various exercises about java and explanations) for Android, but I have a question: the application becomes very heavy if I create a Activity (with an XML file) per exercise or screen with explanations, right? How would I solve that problem? In case, man app would have several types of exercises, such as exercises where the user marks the correct answer, selects the correct code block or even writes a line of code required for the question.
Is there any way to use the same screen model(XML)/exercise for a specific type of exercise? Type, use one screen template to answer all check questions, and another template for another type of exercise?
P.S: I already have experience in Java, but I started working with Android now.
In fact, you only need one
activity
to manage as many exercises as you want. 100, 200...– itscorey
I believe that the best solution for your case would be to register the questions you want in a db sqlite and mount your screens from that base using Fragments, Voce can also write the questions in a text file and place that file in a /res/raw folder or even an Assets folder, so it would be easier and more dynamic, since Voce can even add more questions without having to change or implement new layouts for these new questions.
– Armando Marques Sobrinho
But do you want to use the same XML then for all questions? Or for each exercise create an XML ( is that this is able to get very heavy) ?
– BrnPer