关于ArrayAdapter两个构造函数的区别
public ArrayAdapter (Context context, int resource, int textViewResourceId, List objects)
与这个
public ArrayAdapter (Context context, int resource, List objects)
其中resource 与textViewResourceId有什么区别
官方文档解释如下
resource The resource ID for a layout file containing a layout to use when instantiating views.
textViewResourceId The id of the TextView within the layout resource to be populated
没怎么理解是因为我自己定义了一个含有imageview的视图,不知道该用哪个构造函数
resource是layout,textViewResourceId是textview的id,如果用了自定义的textview要把这个id传过去,要么就必须把textview的id设为@android:id/textview,大概是这样