Search code examples
javaandroidandroid-arrayadapter

Who calls the getView() method of custom ArrayAdapter class


While using custom ArrayAdapter in android, the getView() of the custom ArrayAdapter is called by whom? I have searched this question a number of times... found it in StackOverflow but the answer which has been marked as satisfactory by the user is:

for the developer it is not necessary to know that who calls the getView() of the ArrayAdapter class".

Please, I humbly request that a more meaningful answer will be appreciated!


Solution

  • getView() is called by a subclass of AdapterView. So, if you attach the Adapter to a ListView, ListView inherits from AbsListView, and AbsListView will be calling getView() to get the rows to display in the list.