I'm creating a screen with about 120 TextViews in a grid pattern -
about 3 screens worth. The TextViews are arranged in TableRows inside
a TableLayout inside a ScrollView. I'm not using a GridView because it
doesn't scroll correctly for my application.

In the Allocation Tracker I can see that my onCreate takes about 46K
of memory, which seems modest. However, I'm getting an out-of-memory
exception from inside the Android framework in the createSurface
method.

I'm trying to figure out how to diagnose the memory usage of
createSurface to see which of my Views is chewing up all the memory.
Maybe it's a programming error on my part or maybe it's a bug in the
Android framework. I just can't tell.

The exception causes the application to be killed, which aborts the
Allocation Tracker so I can't really see what's going on inside
createSurface.

I'm thinking maybe I should override createSurface and surround the
call to the super with a catch block. Then I can stop it in the
debugger before the process is killed. Can anyone think of a more
clever approach? Has anyone else diagnosed createSurface memory
problems? Is there a reference document that describes how it works?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to