我的情况如下。我有两种布局
第一的:
<RelativeLayout ... >
<TextView id="@+id/textview1" .../>
<TextView id="@+id/textview2" .../>
<ImageView .../>
</RelativeLayout>
第二:
<RelativeLayout ... >
<TextView id="@+id/textview3" .../>
<TextView id="@+id/textview4" .../>
<ImageView .../>
</RelativeLayout>
现在我要用这两种布局制作一个列表视图。ArrayAdapter 已准备就绪。现在我需要创建适配器的一个新实例,但我被困在这里。因为它的构造函数是:
public ArrayAdapter (Context context,
int resource,
int textViewResourceId,
List<T> objects)
context The current context.
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
objects The objects to represent in the ListView.
问题&问题:
我不知道如何处理第二个和第三个参数。似乎这两个参数中的每一个都有多种选择。如何启动适配器?