Thursday, February 3, 2011

[android-developers] Is runQueryOnBackgroundThread() the same as filter()

Hi guys,

My question may sound noobish to some of you, but I'd just like to
verify if runQueryOnBackgroundThread() processes requests the same as
filter().

Based on the Javadoc for filter():
public final void filter (CharSequence constraint)
Starts an asynchronous filtering operation. Calling this method
cancels all previous non-executed filtering requests and posts a new
filtering request that will be executed later.

I am asking because I am trying to perform pseudo-filtering on a
ListView. I say pseudo because instead of actually filtering the
list, my client wants the list to just scroll to the specified row on
the list. My current implementation uses runQueryOnBackgroundThread(),
then I get the _id returned by the cursor and scroll to that position
in the ListView.

Now, my client complains that the filtering is slow on their test
devices (they are testing on Android 1.5 phones), but I don't see any
lag on my end (I use Samsung Galaxy S).

That being said, I just want to make sure that my filtering does what
filter() should do -- that is, cancel previous filtering requests and
just perform the latest one.

Any help would be appreciated, like always.


Thanks!
- Zarah.

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate