List activity with header, footer and empty all visible

前端 未结 8 1312
失恋的感觉
失恋的感觉 2021-01-08 00:36

I would like to have the listview in a ListActivity be displayed with the header and footer visible all the time even if the list data is empty.

An empty list causes

8条回答
  •  醉梦人生
    2021-01-08 00:45

    This answer is a bit late, but you can simply override BaseAdapter.isEmpty() to return false.

    public boolean isEmpty() {
        return false;
    }
    

提交回复
热议问题