Search code examples
javaandroidlistviewgithubpull-to-refresh

Android: How to put github library into project


I want to put LoadMore/PullToRefresh feature to my app via this library made by shontauro. I've tried it like it's said to be done in README, but I think that something is missing there. I don't understand the logic at all. I've put some libraries to my projects in the past (appcompat support library, other .jar libraries etc.) but I didnt figure out what is the system of this type of libraries.

Do you have any idea how to accomplish that?


Solution

  • After you downloaded the library from Github, you have to add it to the Eclipse workspace.

    Go to File -> Import and Choose Android -> Existing Android Code Into Workspace. Now you will see this dialog:

    Import dialog

    To import the library properly you have to:

    1. Choose folder of the library
    2. Select the library
    3. Click finish

    Now the library is in your workspace.

    You have to add the library to your project. Right click on your project and choose Properties. Then go to Android settings.

    Android settings eclipse

    Here you can add the library to your project by clicking on Add....

    If the library isn't listed in the dialog after you clicked on add, then you have to mark the library as library. Go to the Android project settings for the Library and check Is Library.