你好我想及時刷新列表視圖,這裏我沒有添加/刪除任何行。我想刷新,因爲要刷新行中的現有數據。如何及時刷新listview內容
我正在這樣做,但這不適合我。
// Update the Message on the screen to help for troubleshooting.
private void updateListView() {
// Callback to update the message in a second.
new CountDownTimer(30000, 1000) {
@Override
public void onTick(long arg0) {
adapter.notifyDataSetChanged();
listView.invalidateViews();
listView.refreshDrawableState();
}
@Override
public void onFinish() {
}
}.start();
}
數據是否應該改變? – vjdhama
什麼是您正在使用的DatasSet?你可以顯示適配器的getView()嗎? – akashsr
@vjdhama沒有新行正在插入/刪除,只更新現有行 – Mick