Mark, thank you so much for the pointer and information!!

you are right on the tabs and activity. the view hierarchy depth of my
activity is only 6 but, because the activity is 'hosted' by another
TabActivity, the total depth on StackOverflowError exception is 13
(6+7).

what i don't understand is:

1). is the critical point measured by the depth of hierarchy or by the
total memory size used by all the views on the hierarchy?

2). how does setBackgroundResource() increase the depth or memory
usage of 'the stack'?


thanks again!!



On Feb 26, 9:06 am, Mark Murphy <mmur...@commonsware.com> wrote:
> HeHe wrote:
> > it makes me wonder if my view layout has (easily) reached a "critical
> > point" of stack size limit.
>
> Use hierarchyviewer both to determine your View hierarchy depth and
> determine where you may be able to consolidate some containers, to
> reduce the hierarchy depth and in turn eliminate your stack size problem.
>
> One of the reasons I rail against the use of activities as the contents
> of tabs, for example, is because doing so is very wasteful from a View
> hierarchy standpoint. Just switching those to be Views in tabs, rather
> than Activities in tabs, can clear up problems.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Android Development Wiki:http://wiki.andmob.org

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

Reply via email to