0

I have an Arraylist<HashMap<String,String>> with three records . I am displaying them using a CustomAdapter which extends BaseAdapter.

In first call I am getting three records in gridview.

In second call I am getting 3+3 = 6 records.(same 3 again)

In third call I am getting 3+3+3 = 9 calls and so on.

I used grid.invalidateViews(). But it is not working please help.

Gowri
  • 16,587
  • 26
  • 100
  • 160
  • 2
    add some code... My experience tells me there is some problem in the getView() method. anyway post your code. – drulabs Dec 18 '12 at 07:01

1 Answers1

0

When You put your ArrayList in CustomAdepter then Your Arraylist not clear . So you should use arryList.clear(); in your class before putting new elements in it

Deepanker Chaudhary
  • 1,694
  • 3
  • 15
  • 35
  • 1
    actually my arraylist was static , I just removed the static keyword and it starts working fine.thankxx coz I noticed "static when I was going to apply your suggetion. – Passionate Sud Dec 19 '12 at 12:12