ArrayAdapter<HashMap<,,>> with commonsguy EndlessAdapter class

荒凉一梦 提交于 2019-12-06 08:35:27

Your problems have nothing to do with EndlessAdapter.

First, get your code working with an ArrayAdapter, ignoring EndlessAdapter for now. This will require you to learn how to create a custom ArrayAdapter, as you will quickly discover that ArrayAdapter knows little about how to use a HashMap<String, String>. You will need to extend ArrayAdapter to your own WhateverThisIsAdapter, where you override getView() to handle pouring data from your HashMap<String, String> into inflated rows, properly handling your row recycling. This free excerpt from one of my books will demonstrate some of this.

Then, and only then, wrap the working ArrayAdapter in an EndlessAdapter.

Also, never hard-wire paths, as /sdcard is wrong on most Android devices.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!