> - Where is the data that it need to work with? I can only see > constrain in the performFilter() function
The data is the data you pass to the ArrayAdapter. Or the ArrayAdapter's data. > - For the publishResults() function. What do I need to do with it? I > don't see anything like a context that can help me reach out of the > class so how can I publish the result? Just use the notify methods of the Adapter. For instance: @Override protected void publishResults(CharSequence constraint, FilterResults results) { //noinspection unchecked mObjects = (List<T>) results.values; if (results.count > 0) { notifyDataSetChanged(); } else { notifyDataSetInvalidated(); } } > - And for the FilterResults class, isn't the values need to be > Object[] or List<Object> because it's said to "Contains all the values > computed by the filtering operation. ". No, it has to be an Object. For instance, the CursorAdapter publishes a Cursor as the result, not an array or a list. > > Thank you. > > On Apr 3, 1:36 am, "Romain Guy" <[EMAIL PROTECTED]> wrote: > > Hi, > > > > The best thing to do is indeed to override getFilter() and return a > > Filter that will do what you are proposing. The current ArrayAdapter's > > Filter simply matches the text against the first characters of each > > entry of the array. > > > > > > > > On Wed, Apr 2, 2008 at 10:31 PM, AkaZn <[EMAIL PROTECTED]> wrote: > > > > > Hi > > > > > I want to somehow emulate the idea T9 Text Input (not it but similar > > > to it) and I want to use the AutoCompleteTextView to suggest the user > > > the word they can choose. But only overriding the performFiltering > > > function of the AutoCompleteTextView class is not enough to do the > > > work as use my customize function to do the filter process or at least > > > use regex. > > > > > So how can I customize the filtering process so that I can customize > > > the dropdown list of the AutoCompleteTextView? > > > > > I noticed that in the ArrayAdapter class, there is a getFilter() > > > function but I don't know if I can do anything with it. > > > > > Thank you very much. > > > > > --------------- > > > For those who are not familiar with the T9: > > > http://www.t9.com/ > > > > -- > > Romain Guywww.curious-creature.org > > > -- Romain Guy www.curious-creature.org --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---