Skip to content
Advertisement

Trying to display arraylist in listview gets me this error unable to resolve contructor?

I imported an arraylist mEpisodeList from another class into my class to make a horizontal number scrollbar for available episodes , each number representing an episode I get this unable to resolve contructor error ,

here is the ArrayList mEpisodeList

here is the mehtod

JavaScript

Advertisement

Answer

Your ArrayAdapter is expecting a string array (ArrayAdapter<String>) and your actual ArrayList is of GridEpisode type, they do not match. Change this line;

JavaScript

to this:

JavaScript

Notice the ArrayAdapter type is changed from String to GridEpisode.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement