Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android

Table layout is way too slow

Originally, I was putting images into a table layout for display. But it's very time-consuming to update each time a button is pressed. So, is there any faster way to achieve the same effect of table Layout for imageView elements display? thanks

Could you provide a screenshot of what you want your result to look like?

I didn't find a way to add image to this this comment. But I changed my profile image to the screen shot if it helps any.

Please use a image upload service such as http://imgur.com/

It is safe for me to say... that I have no idea what's going on in your picture. Sorry!

I'm trying to create some pixel-like image using tablelayout.

1 Answer

Ben Jakuben
STAFF
Ben Jakuben
Treehouse Teacher

You might have slightly better performance than a TableLayout with a GridLayout, but it sounds like it's probably related to the images. If you have that many images that all need to be loaded, try to make them as small as possible. As far as speeding up the update, that depends on what you're doing and how you're doing it when the button is pressed. You will want to cache as much as possible and only change as little as is needed. Sorry this isn't more concrete advice, but hopefully you find a good solution. :)