The first is to classify the various categories of storage in different packages, so you want to create a few different functions in the project source package eg:utils, model, receiver, etc., the final result should be the left:
It is obvious that the structure after the establishment of the project is the right one, so it is a matter of course to choose the New-->package,name column to fill the activity, but the result is the following left ...
The results are obviously different from what we expected, and we see that activity and com.mukekeweather.app are parallel structures, and what we need is a tree-like structure.
After a lot of data to understand this problem, because the new package in Java is layered, is in the name of the "." To be layered , as you can see from the diagram on the right, Our original package was Com.mukekeweather.app, then we had a tree-like file schema, a COM folder under the SRC folder, and then a new Mukekeweather folder in the COM folder, and then the new app folder under it. So, the schema of the folder we envisioned should be the rightmost one ...
So according to such a folder structure, we in the new package when the New-->package,name column should be filled in com.mukekeweather.app.activity, com.mukekeweather.app.db, Com.mukekeweather.app.model, Com.mukekeweather.app.receiver and so on can achieve the effect we want, just like the following two pictures ...
Then we see that the effect is the following ...
OK, this way, in fact, understand the new package in Java in the name of the writing and the package in the file of the actual organizational structure of the relationship between the very easy, we have just the way to continue to add a few other packages to achieve the effect we have expected, is the left side of the picture, The corresponding file structure is the right way ...
Andriod project Development Combat (1)--How to build a new package under one package in eclipse