Android 带有addHeader的ExpandableListActivity

Android 带有addHeader的ExpandableListActivity,android,Android,有人向ExpandableListActivity添加了静态头。请帮助,我想在ExpandableListActivity中创建一个标题。 谢谢 Deepesh只需将所需视图充气,并将其添加为标题: View header = (View)getLayoutInflater().inflate(R.layout.header, null); getExpandableListView().addHeaderView(header); 只需将所需视图充气并将其添加为标题: View header

有人向ExpandableListActivity添加了静态头。请帮助,我想在ExpandableListActivity中创建一个标题。 谢谢
Deepesh

只需将所需视图充气,并将其添加为标题:

View header = (View)getLayoutInflater().inflate(R.layout.header, null);
getExpandableListView().addHeaderView(header);

只需将所需视图充气并将其添加为标题:

View header = (View)getLayoutInflater().inflate(R.layout.header, null);
getExpandableListView().addHeaderView(header);

查看链接Hi-Adil,我需要这个用于ExpandableListActivity,我可以用于ListView,但我想用于ExpandableListActivity。您是否为
ExpandableListActivity
尝试过它,发生了什么事。。?您面临哪些问题?..如何在ExandableListActivity中添加标题,任何代码链接都可以在Ank中添加。您好,我需要这个链接用于ExpandableListActivity,我可以为ListView添加标题,但我想为ExpandableListActivity添加标题。您是否为
ExpandableListActivity
尝试过它,发生了什么事。。?您面临哪些问题?如何在ExamplableListActivity中添加标题,任何代码链接都可以在Anks中完成