Hi All...
as part of updating my app I've decided to drag it into the 21st
century and implement Drag and Drop on my ListView Fragment.
Noodling around for an easy way to do it I came across Mark Murphy's
super handy TouchListView library as adapted from TouchInterceptor
from the stock Music app. I tried it out and the library works great
in a regular app, but for some reason it refuses to work within any
ListFragment.
The line:
TouchListView tlv=(TouchListView)getListView();
always causes a ClassCastException: 01-17 11:53:43.705: E/
AndroidRuntime(25113): Caused by: java.lang.ClassCastException:
android.widget.ListView cannot be cast to
com.commonsware.cwac.tlv.TouchListView
Needless to say TouchListView extends ListView.
I spent some time working through this and in my testing I've found
that:
- It's nothing to do with TouchListView - creating my own custom
ListView (that doesn't override anything from core) will generate the
same error
- It's not just my app: attaching the TouchListView library to the
Google API Demos app and inserting the (TouchListView)getListView() in
the FragmentsListArray code generates the same error.
---------------
Does anyone else see the same problem - or am I being blindingly
stupid (again!)
Nick
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en