Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何正确使用 ListAdapter.getView(int position, View convertView, ViewGroup parent) 方法?我无法找出 ViewGroup 的期望。
从我得到的:
parent 是由 提供数据的ListView(或其他类型的ViewGroup)ListAdapter。
ListView
ViewGroup
ListAdapter
注意:你不应该直接调用这个方法。它是Adapter您通常在您自己的BaseAdapter子类中重写的接口方法,使您可以完全控制列表中每个项目的视图显示方式。
Adapter
BaseAdapter