0

Using the new SwipeRefreshLayout from Support Revision 21 (or latest today, from sdk manager) I get it to work but I need to move down the view using

import android.support.v4.widget.SwipeRefreshLayout;
....
mSwipeLayout = (SwipeRefreshLayout) findViewById(R.id.swipe);
mSwipeLayout.setProgressViewOffset(false, 100, 150)

The method setProgressViewOffset(boolean, int, int) is undefined for the type SwipeRefreshLayout.

How to fix this?

Jonas Borggren
  • 2,591
  • 1
  • 22
  • 40

2 Answers2

0

Clean your project and rebuild. You may be compiling the old SwipeRefreshLayout into your APK.

If you are using gradle, make sure you are referencing version 21.0.0 of the support-v4 library.

Or if you are using the JAR, make sure you don't have the old JAR version being included.

TalkLittle
  • 8,866
  • 6
  • 54
  • 51
0

Talklittle was right.

This answer fixed my problem.

I had facebook SDK which had an older support library than the project I was working on.

t seems like the different projects are using 2 separate support libraries and there for the checksum is different.

You must repeat this for both the Facebook SDK project and the app you are building.

what I do when I get this error is:

1. Right click the project.

2. Android Tools -> Add support library

3. Accept the downloading of the library.

this insures 2 things:

A. You get the newest version of the support library from the Google sources.

B. You have the EXACT same library in all your projects.

Community
  • 1
  • 1
Jonas Borggren
  • 2,591
  • 1
  • 22
  • 40