How to control the size of cell in dynamic gridview
to resize the cell item to take wrap_content
by Java?
ArrayAdapter<String> adp = new ArrayAdapter<String> (this, android.R.layout.simple_dropdown_item_1line, list);
grid.setNumColumns(8);
grid.setBackgroundColor(Color.GRAY);
grid.setColumnWidth(100);
//grid.setFastScrollEnabled(true);
grid.setOverScrollMode(View.OVER_SCROLL_IF_CONTENT_SCROLLS);
//grid.getMeasuredWidth();
grid.setMinimumWidth(100);
grid.setHorizontalFadingEdgeEnabled(true);
grid.setAdapter(adp);
balance_layout.addView(grid);