What is add() in this tutorial using Android?

63 Views Asked by At

i am newbie in android and i am following this tutorial

public void setData(List<Model> data) {
        clear();
        if (data != null) {
            for (Model appEntry : data) {
                add(appEntry);
            }
        }
    }

i am getting error on add(appEntry)line: The method add(Location) is undefined for the type LocationListAdapter while LocationListAdapter is my class name that extends from BaseAdapter

1

There are 1 best solutions below

2
On

You should extend your LocationListAdapter to ArrayAdapter instead of BaseADapter