集合类数据对象 --> 适配器对象 --> 适配器控件
主要用于纯文本数据的显示
可用于复杂的数据显示,将集合中不同的数据项填充到不同的View的不同组件中
它是以上适配器的公共基类,可以实现以上适配器的所有功能,且可以自定义Adapter来定制每个条目的外观功能,具有较高的灵活性
说明:上面是约束布局组件,下面是ListView组件
public class QQMsgBean { private int qq_icon; private String qq_name; private String lastmsg_time; private String lasttitle; private String noetrendmsg_count; public QQMsgBean(int qq_icon, String qq_name, String lastmsg_time, String lasttitle, String noetrendmsg_count) { this.qq_icon = qq_icon; this.qq_name = qq_name; this.lastmsg_time = lastmsg_time; this.lasttitle = lasttitle; this.noetrendmsg_count = noetrendmsg_count; } //get,set方法.... }
该类继承BaseAdapter类,负责把数据和界面适配
原文:https://www.cnblogs.com/zddsl/p/14551244.html