이것이 작동하지 않습니다. 첫 번째 SimpleAdapter에 두 번째 SimpleAdapter를 추가하고 싶습니다. 하지만, 그것은 덮어 쓰기되고 두 번째 목록 만 표시됩니다.안드로이드 Simplelist 어댑터를 사용하여 여러 목록 개체를 표시하는 방법
내가 LIST_ITEM 각 개체의 다른리스트 형식으로 하나의 목록에 모두 표시 할 및 list_item_new 이 불가능
ListAdapter newAdapter = new SimpleAdapter(
NotificationTask.this, notificationsList,
R.layout.list_item_new, new String[] { TAG_PID,
TAG_NAME, TAG_DESCRIPTION},
new int[] { R.id.pid, R.id.name, R.id.description });
newAdapter = new SimpleAdapter(
NotificationTask.this, oldNotificationsList,
R.layout.list_item, new String[] { TAG_NID,
TAG_NAME, TAG_DESCRIPTION},
new int[] { R.id.pid, R.id.name, R.id.description });
//list.setAdapter(adapter);
setListAdapter(newAdapter);
((BaseAdapter) newAdapter).notifyDataSetChanged();
, 당신은 정말 처음 자바의 확고한 이해를 얻는 아마 당신은 놀랄 사실로 일반적으로 프로그램에서 살펴 보셔야합니다 변수를 두 번 설정할 때 값을 덮어 쓰면 몇 가지 기본적인 프로그래밍 개념을 이해할 수있는 구멍이 있음을 나타냅니다. – kabuko