0

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

BenMorel
  • 34,448
  • 50
  • 182
  • 322
Erum
  • 790
  • 3
  • 14
  • 36

1 Answers1

0

You should extend your LocationListAdapter to ArrayAdapter instead of BaseADapter

  • It depends on how BaseAdapter is implemented. –  Jan 08 '14 at 13:26
  • i have added code of extends ArrayAdapter but it still gives me error at add() line ERROR : The method add(Location) is undefined for the type LocationListAdapter – Erum Jan 09 '14 at 05:16