We all can import an existing Android project into workspace using File->Import->Existing projects into workspace. Is there any such method to include an existing java file( Activity) into a project.
For example if I have activity hello.java in project P1. Can I copy hello.java in project P2 in src/ folder and then import into the project somehow?
What I do normally in such cases is create a new class in Project P2 and copy the code from hello.java from P1 manually. Is there any better approach?
I am using Eclipse as editor.
Regards,