[Android] ListView 새로고침/갱신하기 (with BaseAdapter)
2020. 2. 17.
보통 아래와 같이 Adapter에 추가(또는 삭제) 하고 notifyDataSetChanged()를 호출하면 ListView 가 새로고침 된다고 한다. 하지만 아무런 변화가 없다. 1 2 listAdapter.addItem(ds); listAdapter.notifyDataSetChanged(); cs 그래서 구글링해보니.. ListView 최초 생성때와 같이 setAdapter 를 하라고 한다. 잘 동작한다. 1 2 listAdapter = new MainListAdapter(getActivity(), ArrayList mStrData); mainListView.setAdapter(listAdapter); Colored by Color Scripter cs 하지만 서버로 부터 실시간으로 많은 데이터를 받..