开发者

How to add Header to the listview which will move horizontally with the elements in the listview in android?

My query is that how can i add Header to the listview which will be static vertically but horizontally it can move with the items in the listview. for e.g. say i have 8 columns in listview i have used custom adapter extends Baseadapter to inflate the view now each column has header. so i want this each header in listview. now suppose i move the list horizontally header also should move. and if i scroll vertically then header should not move vertically it开发者_如何转开发 should stick to its position. i have tried addHeaderView but my header moves vertical also. you can think of how "microsoft excel" works if you scroll vertically than you will get thounds of rows whith static header but if you move horizontally the header also move along with the columns.


Did you try listView.addHeaderView()

The documentation for addHeaderView is available on developer.android.com

There are already a lot of other questions like this on, look at how-to-use-android-addheaderview which may also be useful to you if you need additional information

Please use the search facility to look for more answers

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜