Arrayadapter Number Of Elements In Data Set Is Zero
I'm trying to build a list with a customized view for the rows, each row will consist of an image view and two text views. in order to do so i extended the ArrayAdapter class (call
Solution 1:
Make sure getCount()
is properly implemented so :
@Override
publicintgetCount(){
return posters!=null ? posters.length : 0;
}
EDIT: by calling the
ArrayAdapter(Context context, int textViewResourceId)
constructor you are not passing your array of objects to the constructor.
You should be calling the
ArrayAdapter(Context context, int textViewResourceId, T[] objects)
constructor which also takes as parameter the array of objects.
Post a Comment for "Arrayadapter Number Of Elements In Data Set Is Zero"