I am new to android programming and I need some expert advice on the best approach. I have a menu driven app, that provides solutions to problems at my job here. It is about three menus deep with the text or graphic solution on the last page. So far I have been creating a new class and new xml for each solution, this seems to be too much (maybe 100ish classes and xmls). What should I be doing? Passing itents during menu selection? Sqlite to store the data? Thanks in advance for pointing me in the right direction
Share
Short answer: Pass intents to a universal “solution” layout during menu selection.
If all of the solutions have the same format layout, consider making just one activity layout with custom values sent to it. The values can be stored in xml, which would make it a lot easier.
For example, if you have a standard “solution” layout that contains a title, solution text and a picture resource, instead of creating a separate class for each solution, just pass the title string, solution string, and resource location string as extras to the solution Activity.