怎么在ListActivity顶部添加Button在ListActivity里,图片是header.xml布局,左边的“返回”button是在非根目
怎么在ListActivity顶部添加Button
在ListActivity里,图片是header.xml布局,左边的“返回”button是在非根目录情况才显示,右边的"刷新"button一直都显示!用什么方法设置
android button
[解决办法]
listview在第一行的时候,加载head.xml布局,并设置相关的监听事件,其它行则加载item.xml
[解决办法]
在listview的上面加个linearlayout嘛
或者用framelayout
[解决办法]
在header.xml这个页面布局的顶部,先加个Linearlayout嘛
[解决办法]
你这个activity对应的layout布局文件是不是header.xml?是的话就在这个里面加。
[解决办法]
void addHeaderView(View v, Object data, boolean isSelectable)
Add a fixed view to appear at the top of the list.
void addHeaderView(View v)
Add a fixed view to appear at the top of the list.
http://developer.android.com/reference/android/widget/ListView.html
