0

I have trouble including the PullToRefresh library in my android project. Its distributed as a source code form on Github and I have imported it as a separate project in Eclipse. File -> Import Existing Code Into Workspace. Compile it, then added it to my project's build path. (Project->Properties->Java Build Path->Project Tab. Problem is, that it does not get compile into the dex file in the apk. I have used dex2jar to verify the issue exists. Anyone used this lib before? Am I importing it correctly?

UPDATE: It appears that the R.class in not being benerated in the library .jar file. Anyone knows why that might be the case?

enter image description here

Nederealm
  • 447
  • 4
  • 15
  • why don't you want to use the https://developer.android.com/reference/android/support/v4/widget/SwipeRefreshLayout.html ? – ligi Oct 31 '14 at 15:02
  • would like to, but I'm required to use this, don't ask why – Nederealm Oct 31 '14 at 15:03
  • 1
    if you have it as a library project alongside your own, you need to go project->porperties->android (on your own project) then in the bottom you can add PullToRefresh, also explained here: http://stackoverflow.com/questions/8248196/how-to-add-a-library-project-to-a-android-project – cYrixmorten Oct 31 '14 at 15:22
  • You should give a try to XListView (https://github.com/Maxwin-z/XListView-Android). It has pull up to refresh and pull down to load more items. Excellent option to use with pagination – Luciano Rodríguez Oct 31 '14 at 15:47

1 Answers1

0

Its likely a library project Do the following 1)You need to download the full folder (https://github.com/johannilsson/android-pulltorefresh/tree/master/pulltorefresh)

2) Import to eclipse as a project (file>import>existing android code)

3) In your app, right click> Properties> Android(down the left side pane)> add library(bottom right)

4) Select the library and it should work

Hamzah Malik
  • 2,540
  • 3
  • 28
  • 46