Android Custom Arrayadapter Constructor Issue
Solution 1:
Just because the constructor you are defining takes a certain parameter list, it doesn't mean the super class has that constructor. After all, you can define any arbitary parameter list for your constructor.
The super constructor you are trying to call is closest to ones in the ArrayAdapter class, but the error message suggests you are trying to inherit from SimpleAdapter. Have you got this right? If it should be ArrayAdapter, the last argument needs to be the array (or List) of the objects which back the adapter, instead of just a single object of that type.
If it is SimpleAdapter, the only constructor is here, which looks quite a bit different.
Solution 2:
super
is used to call the constructor of the superclass, the class you're extending. Look at the documentation: the constructor of SimpleAdapter
has different arguments.
Post a Comment for "Android Custom Arrayadapter Constructor Issue"