3

I am just starting off with android and have been googling high and low to find any tutorials/resources that could answer my beginners questions.

  1. How can import a third party resource into my project and start using it? For example, i wanted to use scrollableTabActivity, a widget that's available at https://github.com/honcheng/ScrollableTabHost-for-Android. I have downloaded and it looks like it is a project by itself. How can import into into my project and start using it?

This is the case of even projects like droid fu, for the life of me i could not figure out how to add them and start using in my project.

I did successfully added asynchttp into my project cause there was .jar download available. But for projects like droid-fu or scrollableTabActivity, how can i use the source files to add the functionality into my project?

Any help is highly appreciated

Thanks

1
  • You should just compile it into a jar file? I have no experience with android but it makes sense. Commented Jun 14, 2011 at 10:00

3 Answers 3

4

Add the projectyou downloaded to you workspace. Right click on it, properties, Android and be sure the Is Library checkbox is checked.

Then in your project, right click, properties, Android and click on add on the bottom right to add the previous project.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks wieux, may be i have mislead you, but mark put me on the right path. THanks :)
1

The project you refer to actually contains a lot of demonstration code which shows you how to use the ScrollTabHost control in your app. Rather than trying to include this stuff which will just bloat your app, simply copy the ScrollTabHost.java file in to your project, along with any resources upon which it depends.

1 Comment

That was a nice start for me, managed to grab the java from the examples, fixed some dependencies and i have it working. Thanks Allison
1

I agree with Mark Allison's answer. But generally speaking to import a whole project in Eclipse, check the box next to that third party project name on the Project References tab in your project Properties.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.