Somk
Somk

Reputation: 12047

How to import and use another package

I have my main project and I have created another on the side. The new one simply listens for a button click and then runs methods to update a users twitter status.

What I am unable to do at the moment is use this in my original project. I could copy the code into every .java file but that would be excessive.

What would be a better way to accomplish this and activate the onclick listener.

Upvotes: 0

Views: 3036

Answers (1)

Sky Kelsey
Sky Kelsey

Reputation: 19290

If the library is provided as a jar file, then place it in the /libs folder in your project.

If the library is itself an android project, read up on Android Library Projects

If the problem is simply "How do you import a package?", Read this.

Upvotes: 1

Related Questions