How To Populate List View Using Array In A Custom Adapter Using Model Class?
i was trying to adapt this code tutorial: https://www.journaldev.com/10416/android-listview-with-custom-adapter-example-tutorial for my list view, the tutorial use a custom adapte
Solution 1:
The lines,
viewHolder.txtTitle.setText(dataModel.getFicheros());
viewHolder.txtFecha.setText(dataMlodel.getFecha()); // typo error, it's dataModel.getFecha()
present in your CustomAdapter calls getFicheros() and getFecha() from your DataModel class.
Now the issue is getFicheros() returns a String[], unfortunately not a single Android TextView setText() method is designed to work with String[] as a parameter ( there are in all 5 overloaded versions of setText() method).
Hence you are receiving 64: error: no suitable method found for setText(String[]).
Same issue exist with your getFecha() method.
Post a Comment for "How To Populate List View Using Array In A Custom Adapter Using Model Class?"