Our main package is starting to look a little messy. We have Java classes for our Restaurant model mixed up with Java classes for our user interface. Let’s create a few sub-packages to organize our project better.
To create a new sub-package, right click on the main package name and select New > Package:
We will create the following three subpackages to better organize our project:
Drag and drop each Java class into their corresponding packages and select Refactor from the dialog that appears:
Once complete, our file tree in Android Studio should look like this: