How Android introduces open source projects

Source: Internet
Author: User
Tags windows support


To introduce. Pulltorefresh as an example

    1. Download zip, unzip to desktop
    2. Open eclipse,file-import-existing Android Code into Workspace
    3. Select the library file to import into eclipse
    4. Open this library, right-click library,properties-android-library-check is Library
    5. After opening your program, right-click your main program, Properties-android-library-add, select Library file

The basic steps for importing are like this, and the next step is how to use
    1. Find your program-layout-xml add a
      <com.handmark.pulltorefresh.library.pulltorefreshlistview
      Android:id= "@+id/pull_to_refresh_listview"
      Android:layout_width= "Fill_parent"
      android:layout_height= "Fill_parent"/>
    2. Back to Mainactivity, add a piece of code to the header file
      Import Com.handmark.pulltorefresh.library.PullToRefreshListView;
    3. Then change all the ListView you need to Pulltorefreshlistview, for example
      Private Pulltorefreshlistview Mpullrefreshlistview;
    4. Then use it like a ListView.

......................................................................................................................... .............................................

However, after introduction, it is possible to introduce failure, the green check mark becomes the red difference, the reason may be as follows:

Library and project under different drive letter, due to the disk character under Windows support problem, can not drink different drive under the library, the library in the same directory with project can be resolved

How Android introduces open source projects

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.