How to show header of ListView when its empty

后端 未结 4 1096
鱼传尺愫
鱼传尺愫 2020-12-10 18:01

I am developing the following screen

\"enter

The fourboxes next to each other

4条回答
  •  甜味超标
    2020-12-10 18:57

    I found a simple solution for this problem. If there's no elements for list and you are not adding the adapter, just add this:

    mListView.setAdapter(null);
    

    and the header will appear. It's easier than adding empty / fake item to the list.

提交回复
热议问题