How do I assign column headers for the Android GridView?
I am developing a simple application for Android in which I am using a gridvie开发者_如何学Cw
.
In ASP.NET, we use header text=""
. How can I assign a header for each column in the gridview
on the Android platform?
A GridView
does not have columns. It is meant to arrange a flat (without columns) array of items two-dimensionally across the screen. You should use a TableLayout
, which is intented to lay out columned rows.
When you use a TableLayout
, you can add a header row as your first row and then add your data rows after that. There isn't a distinction between the two.
精彩评论