Sunday, 15 January 2012

android - Broken sort after search -


I wrote a bus app with ListView and ActionBarSharlock (ABS). I have my Objects, custom array adapter, in my ABS, now my searchView and drop down list is about my problem, if I am doing something right before correcting all the tasks, but after "searching" The sort function is broken. IITEM selected on public exclusion (int position, long item ID) {Switch (status) {Case 0: countryArrayAdapter.sort (new serialization);)

  break; Case 1: ................... searchview Antititist Filter QueryTixist Aliconer = New Searchview. Antititist Listener () {Public Boolean OnlineTT Change (String Newtext) {CountryAir.fifter (). Filter (newText); Back true; }   

What do I do wrong?

What do I do?

nothing ArrayAdapter :

  The code related to the implementation of API 17 for public Zero Sorting is:  ArrayAdapter  is a bug.  

(Comparative> Super T> Compiler) {synchronize (mLock) {if (mriginalValues! = Null) {Collections.sort (mriginal Values, comparator); } Else {Collections.sort (mObjects, comparator); }} If notify (mNotifyOnChange) the DataTag (); } Public T getItem (int position) {return mObjects.get (status); }

As you can see, it sometimes changes a different list. In fact, after filtering by you, mriginalvalues ​​ is not zero go.

There is an alternative solution for this.

I always suggest not using the ArrayAdapter and instead of making it in return, it will have to be re-filtered with the same text value after each lesson.

Edit:

Just got it detected

Already a known problem for a few years Is:

No comments:

Post a Comment