I am new in development, I am making quiz app to students and I need your recommendation:
When TestActivity is opened student see different types of questions: some of them just check boxes, some "yes"/"no" buttons, some editTexts to allow to student to input correct answer.
Student see just 1 task at same time, when student presses button "next" next task opens.
For reason that every type of question contains different views I need to change that views very often inside of same Activity. What is the best way to do it?
You can either:
Use different types of Fragments, each using a different layout
Programmatically create the Views and set their visibility
Change the layout of the Activity every time.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.