I want to separate my Java source code into different folders (e.g. folders for activities, fragments, etc like in https://blog.smartlogic.io/2013-07-09-organizing-your-android-development-code-structure/)
How do I create the new folders in Android Studio. The thing I thought might work is 'Right Click On The Package -> New -> Folder -> Java Folder' but this did not appear to do anything.
If you want to make a folder to put your Java files in it then go to -> new-> package and then move your files there but don't forget to change the package name in each file you move to the new package file.
See the Java Tutorial on Packages.
A package in Java not only groups your classes together, it creates a namespace.
By convention, use a domain name in reverse direction to name your package.
package com.example.awesomeapp.login ;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With