Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LazyList update(refresh) Listview #44

Open
sercanerfidan opened this issue Jan 17, 2015 · 0 comments
Open

LazyList update(refresh) Listview #44

sercanerfidan opened this issue Jan 17, 2015 · 0 comments

Comments

@sercanerfidan
Copy link

Hi,

I m trying to use searchView with LazyList. In my lazyAdapter I m updating my arraylist , this works smoothly but my listview doesn't update with arrayList. This is my filer method. I suppose notifyDataSetChanged does not work.Please help how can I refresh my listview?

public void filter(String charText) {

    charText = charText.toLowerCase(Locale.getDefault());
    //list.clear();
    list = new ArrayList<HashMap<String, String>>();
    if (charText.length() == 0) {
        list.addAll(arraylist);
    } 
    else 
    {
        for (HashMap<String, String> map : arraylist) 
        {
            if (map.get("radio").toString().toLowerCase(Locale.getDefault()).contains(charText)) 
            {
                list.add(map);
            }
        }
    }
    notifyDataSetChanged();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant