Problem
I have multiple apps that have the same exact layout and functionality. Think of it as: creating same app for multiple pizza restaurants.
Now I need to make an android module that will just extract everything(activities, layout, code, etc..) to these apps without the need to manually create activities and then call the xml that is in my module.
Steps I've done
I followed the module tutorial on Google's Android site here. Specifically,
- Convert an app module to a library module
- Generated the AAR file
- Add the library as a dependency
Details
The previous steps work, however, I will have to create all activity in each single project, then modify the setContent()
to call my library xml setContent(R.layout.**myModule)
- How would I go about if I want to make the module copies activities and layout xml to another project without the need to manually creating them ?
- Is there a better approach than using a module ?