私の状況は次のとおりです。私は2つのレイアウトを持っています
初め:
<RelativeLayout ... >
<TextView id="@+id/textview1" .../>
<TextView id="@+id/textview2" .../>
<ImageView .../>
</RelativeLayout>
2番:
<RelativeLayout ... >
<TextView id="@+id/textview3" .../>
<TextView id="@+id/textview4" .../>
<ImageView .../>
</RelativeLayout>
次に、これら 2 つのレイアウトでリストビューを作成します。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.
問題 & 質問:
2 番目と 3 番目のパラメーターの処理方法がわかりません。2 つのパラメーターのそれぞれに複数の選択肢があるようです。アダプターを開始するにはどうすればよいですか?