-4

MyAdapter class extend from BaseAdapter but MyAdapter constructer called but getCount and getView method doesn't call

Image description

A.A Noman
  • 4,233
  • 9
  • 23
  • 38

1 Answers1

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,287
  • 1
  • 9
  • 20