複数の同じレイアウトを異なるテキストと画像で膨らませるにはどうすればよいですか? このコードを使用してみました
for (final Tour t : info.tours) {
final LinearLayout list = (LinearLayout) findViewById(R.id.tours_list);
Log.d(Const.LOG_TAG, "Add child view to tours_list");
final LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View child = inflater.inflate(R.layout.tour_item_for_guide_info,
list, true);
final ImageView tourImage = (ImageView) findViewById(R.id.tour_image);
final String tourImgUrl = Const.HOST + t.image;
imageLoader.DisplayImage(tourImgUrl, tourImage);
TextView tourText = (TextView) findViewById(R.id.text);
tourText.setText(t.name);
}
ただし、テキストと画像は最初に膨張したレイアウトに設定され、以前のテキストと画像が置き換えられます。レイアウトのIDが同じであるため、何が起こるか理解しています。解決できますか?ListView とアダプターについては知っていますが、それらがなくてもできるかどうかを知りたいです。