Andreea
Andreea

Reputation: 151

How can I use in my project some classes from other project?

I have an android project and I want to use some classes from another android project. How can I do that? In my project I draw the road between 2 points. From the new project I want to use some classes that help me draw more points on the map and tooltips with information for they.

Upvotes: 1

Views: 1014

Answers (2)

Gaurav Agarwal
Gaurav Agarwal

Reputation: 19102

  1. Right Click on your project -> New -> Package

  2. Name the package com.youname.yourapp.something

  3. Copy the classes you want to use in this project.

  4. Use import to use copied classes.

Upvotes: 0

Boris Strandjev
Boris Strandjev

Reputation: 46943

Create a library project containing the common part for the two projects. Make the two projects reference this Android library project.

Upvotes: 2

Related Questions