1

I am building a dynamic table layout with 1,000 rows. The build is fairly quick, but drawing it takes over 10 seconds. The table contains three image buttons and 7 text columns. Once loaded the table performs quite well, but reloading it (i.e. when changing the sort order) is also very slow.

4

1 に答える 1

2

I am building a dynamic table layout with 1,000 rows

That is an exceedingly bad idea. For starters, you will crash with an OutOfMemoryError on some devices, as you are blowing through several MB of heap space in just one activity.

Please use a ListView, or some other form of AdapterView, so that only as many views as is needed to fill the screen are created (and then recycled as the user scrolls).

于 2013-03-08T21:45:46.017 に答える