MyAdapter
class extend from BaseAdapter
but MyAdapter
constructer called but getCount
and getView
method doesn't call
Asked
Active
Viewed 37 times
-4

A.A Noman
- 5,244
- 9
- 24
- 46
-
what is the size of arraylist ? – Hemant Parmar Nov 23 '17 at 10:26
-
This [answer](https://stackoverflow.com/a/16338380/2595870) should be helpful. – Eddwhis Nov 23 '17 at 10:27
-
you forget this, modify your code. @Override public Object getItem(int position) { return (poll_list.get(position)); } – Hemant Parmar Nov 23 '17 at 10:30
-
Please incorporate the referred code as text in your question. – Heikki Nov 23 '17 at 10:38
-
list is the jsonArray ....hemant – santosh narare Nov 23 '17 at 10:56
-
ohhh git it ... – santosh narare Nov 23 '17 at 12:49
-
i forget list.notifychangelistener – santosh narare Nov 23 '17 at 12:49
1 Answers
0
I saw your code, getCount() and getView are the overridden methods of BaseAdapter and whenever you create an object of MyAdapter() class the constructor will be called not the overridden methods, this where polymorphism works. getCount() and getView() will only serve to the class,so when the adapter is sets up only then they will return the values.

Nirmal Prajapat
- 1,735
- 1
- 12
- 23