Hi,

Check out the source code of ArrayAdapter at android.git.kernel.org,
in the project frameworks/base. The adapter is in
core/java/android/widget.

On Tue, Oct 6, 2009 at 4:56 AM, EvgenyV <evgen...@gmail.com> wrote:
>
> Hi!
>
> I'm using custom Adapter extends BaseAdapter. Unfortunately
> BaseAdapter doesn't implements Filterable interface.
> That's a reason I can't use setTextFilterEnabled(true) functionality.
>
> Where can I learn how ArrayAdapter implements Filterable interface?
>
> There is my simple code:
>
> private class MyDataAdapter extends BaseAdapter implements Filterable
> {
> ......
> ......
>    List<MyObject> _data;
>    public Filter getFilter()
>    {
>
>         return new MyFilter(_data);
>    }
> }
>
>    private class MyFilter extends Filter
>    {
>        List<MyObject> _data;
>
>        public MyFilter(List<MyIntent> data)
>        {
>                _data = data;
>        }
>               �...@override
>                protected FilterResults performFiltering(CharSequence 
> constraint) {
>                        ????
>                }
>
>               �...@override
>                protected void publishResults(CharSequence constraint,
>                                FilterResults results) {
>                        ?????
>                }
>
>    }
>
> Thanks in advance,
> Evgeny
>
> >
>



-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

--~--~---------~--~----~------------~-------~--~----~
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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to