Templates for generating files in Android projects, based on different architectures.
- MVVM
- you can create an entire scene (Fragment + ViewModel + XML)
- data binding enabled and already set up
- IMPORTANT: it's based on Android-Base-Project (https://github.com/wolfpackdigitalapps/android-base-project)
- Open the terminal and go to the folder where the makefile is.
- Run: make install_templates
If you want to uninstall them:
- make uninstall_templates
Copy the desired architecture folder (for example: MVVM Flow) to the following path: "{ANDROID_STUDIO_LOCATION}/plugins/android/lib/templates/other/" Note: For Mac users: right click on Android Studio in Applications --> Show Package Contents --> find the path from above.
-
Create a new package for the scene that you want to add now
-
Right click --> New --> Other --> Template Name (MVVM Flow)
-
In the new windows that appeared, set the:
- flow name (ex: Login)
- layout file name (change from the autogenerated name to lowercase: fr_Login to fr_login)
- core package name (com.wolfpackdigital.projectName, delete everything else after it). This is a workaround to automatically add imports for Base Components.
- Click on "Finish" and there you go!
For some reason, after updating Android Studio to newer versions, the custom templates get deleted :( so you need to repeat the process. The good thing is that with the makefile it's easy.