關於刷新GridView適配器數據

lists.clear();
for (int i = 0; i < units.size(); i++) {
    lists.add(units.get(i));
}adapter = new AdminChangAdapter(getActivity(), lists);
GridView.setAdapter(adapter);

GridView.setSelector(new ColorDrawable(Color.TRANSPARENT));

//先lists.clear();spa

//再添加循環get

//適配器寫後面it

adapter = new AdminChangAdapter(getActivity(), lists);循環

GridView.setAdapter(adapter);vi

相關文章
相關標籤/搜索