Reputation:
This is a bit of a basic question/s and pertains to project structure. It's just a basic concept I have missed in android. (as a result of being self taught).
With an app that has many classes, activities and fragments, it's becoming busy in both the java and res folders.
I am unsure what is the best way to proceed with managing larger projects.
For instance, if I have a various sections, bluetooth, wifi, gps, etc. And for many of these they are reusable code "packages" or "modules" (I am not sure of the correct word).
How should I go about formatting my project?
Using packages?
Is there a dll concept equivalent?
There is this question here:
Is there any DLL or DLL like concept in Android?, but it doesn't really help clarify this issue for me.
Any feedback is appreciated.
Upvotes: 3
Views: 142
Reputation: 4573
How should I go about formatting my project?
It depends on your needs. If you want to move some part of logic to a library, you can do that by creating an android library project. See Library Module section: https://developer.android.com/tools/projects/index.html
Is there a dll concept equivalent?
If you want to have a compiled version of that library project (like DLL) you can generate a .jar
file. Refer this link: How to create jar for Android Library Project
So, you can link android library project directly, or, compile it first, and then include as a .jar
file.
Upvotes: 2