Android - Looking for a suggestion for creating a GridView that programmatically resembles a spreadsheet?
I started with the code below. I may have had misconceptions about what the GridView was going to give me ... as being able to make a call to customize the header names for my columns and just loop through assigning text to each row, pair of columns as I went through that loop. That's really all I'm looking for.
I suppose I could create my own GridView with a bunch of text views with lines separating each row, column cell, but I obviously misunderstood, I think the GridView could do out of the box. Something exactly like what you would see in a spreadsheet with each cell separated by lines and putting data in each cell.
Looking for suggestions on the capabilities of any adapter if I need to go this route?
GridView grid = new GridView(this); grid.setId(ViewIdentification.getId()); grid.setLayoutParams(new GridView.LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.FILL_PARENT)); grid.setBackgroundColor(Color.WHITE); grid.setNumColumns(3); grid.setColumnWidth(GridView.AUTO_FIT); grid.setVerticalSpacing(5); grid.setHorizontalSpacing(5); grid.setStretchMode(GridView.STRETCH_COLUMN_WIDTH);
source to share