0

I'm trying to use the Android Music app's TouchInterceptor class to allow a user to reorder a ListView.

It can be found here.

I've copied the file and created the necessary resources.

However, I'm left with 1 error. The method smoothScrollBy is undefined.

I'm using API 7 (2.1). Does it not exist in 2.1? If so, what should I be using? I'd really like to target the application to users at least running 2.1.

Andrew
  • 20,756
  • 32
  • 99
  • 177

2 Answers2

0

smoothScrollBy is in API level 8, which is Froyo (2.2).

You may have to settle for scrollBy, which has been around since API level 1.

Edit: for this specific problem, perhaps take a look at an earlier version of TouchInterceptor.java that was written for 2.1.

Matthew
  • 44,826
  • 10
  • 98
  • 87
0

You could consider doing a backport, at least see if it's doable (or might there be license issues?). The source is here. Knowing how to implement fling could be useful too.

Community
  • 1
  • 1
bigstones
  • 15,087
  • 7
  • 65
  • 82