Best place to addHeaderView in ListFragment

前端 未结 7 1520
梦谈多话
梦谈多话 2020-12-05 02:37

I\'m having some trouble setting up my custom header in my list.

I\'m creating a ListFragment with a custom adapter. I have the list working fine, but I\'m trying t

相关标签:
7条回答
  • 2020-12-05 03:06

    My solution:

    public void onActivityCreated(Bundle savedInstanceState) {
        setListAdapter(null);
        getListView().addHeaderView(mHeader);
        setListAdapter(mAdapter);
    }
    
    0 讨论(0)
提交回复
热议问题