Reputation: 87
I have too many activities in my Android app project and I'd like to manage them using packages.
How can I do it?
Upvotes: 2
Views: 5997
Reputation: 892
in android you have a package name like com.your.package.name. this is your master package. you must create other packages as asub-package of this.
To use this packages in manifest use: ".subpackage.Activity" android os will handle the rest.
Upvotes: 2
Reputation: 28103
I Enjoy creating Package in separate Way.
If you are working in Eclipse Just mention the desire package name at top.
Eclipse will automatically do trick for you.
Upvotes: 1
Reputation: 25757
If you are using Eclipse:
Right click on the project and choose new => "package".
You may need to update your references to other classes once reorganised. I find ctrl+shift+o can help you there too.
Upvotes: 2
Reputation: 7888
Right click to src folder in your project->New->package.write the name of the package there->Finish.you will see the package what you named under src folder of your project.Add class files into that package.While using the clsses of different packages you have to import the classes as they belong to other package and you also have to declare it in manifest file.
Upvotes: 1