问题
I am trying to create a table layout filled with lots of bits of data, the table layout is inside a scroll view.
I am using this to fill it
TableLayout tl;
.....
tl = (TableLayout) findViewById(R.id.layout);
.....
and when I set it I create a new Text View to put into it like so
TextView tv;
....
tr = new TableRow(Context);
.....
tv = new TextView(Context);
tv.setText(progress[1]);
tr.addView(tv);
...
tl.addView(tr);
A new text row is created when I have put 12 text views in it and the tr is added to the tl when it has 12 views in it.
The font size of the text view is default, all I do to the text view you see here
回答1:
Consider changing to a viewgroup that can recycle/reuse its child views, such as a listview or gridview. That way you won't need to keep everything in memory.
来源:https://stackoverflow.com/questions/11043125/openglrenderer-is-out-of-memory