[android-developers] Re: Android 1.5 - crash during drawing of multiline TextView
Thank you very much for answers! I've seen discussions about view hierarchy depth, but after finding out that StackOverflow pops-up exclusively at the moment of text wrapping I didn't believed this is the case. Hierarchyviewer revealed that my hierarchy is really deep (14), but it's not as messy - the biggest portion of this depth is added by TabActivity. As I found out, similar problem is being solved here: http://groups.google.com/group/android-developers/browse_thread/thread/277e81c07591219f/f3f0b6f6ac529bcb I did some hotfix to prevent text wrapping and now I can think about reducing the depth (I don't see a way to do it right now, without rewriting whole UI, but hopefully I'll find something ;). Thanks again, Mike On May 6, 5:38 pm, Romain Guy romain...@google.com wrote: How deep and complicated is your view hierarchy? With Android 1.5, I get the sense that StackOverflowError will be triggered by a too-complex set of views, particularly in terms of depth. You can use hierarchyviewer (in the tools/ of your SDK) to see how many layers you have -- if you're in double digits on the deepest branch, you might need to find ways to simplify the UI. It was already the case in 1.0 and 1.1 but because of new features added in Cupcake, StackOverflowException now happen a bit earlier. This means that the app was almost overflowing anyway. -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: Android 1.5 - crash during drawing of multiline TextView
14 levels is what we consider a very deep hierarchy :) On Thu, May 7, 2009 at 9:26 AM, Mike sra...@gmail.com wrote: Thank you very much for answers! I've seen discussions about view hierarchy depth, but after finding out that StackOverflow pops-up exclusively at the moment of text wrapping I didn't believed this is the case. Hierarchyviewer revealed that my hierarchy is really deep (14), but it's not as messy - the biggest portion of this depth is added by TabActivity. As I found out, similar problem is being solved here: http://groups.google.com/group/android-developers/browse_thread/thread/277e81c07591219f/f3f0b6f6ac529bcb I did some hotfix to prevent text wrapping and now I can think about reducing the depth (I don't see a way to do it right now, without rewriting whole UI, but hopefully I'll find something ;). Thanks again, Mike On May 6, 5:38 pm, Romain Guy romain...@google.com wrote: How deep and complicated is your view hierarchy? With Android 1.5, I get the sense that StackOverflowError will be triggered by a too-complex set of views, particularly in terms of depth. You can use hierarchyviewer (in the tools/ of your SDK) to see how many layers you have -- if you're in double digits on the deepest branch, you might need to find ways to simplify the UI. It was already the case in 1.0 and 1.1 but because of new features added in Cupcake, StackOverflowException now happen a bit earlier. This means that the app was almost overflowing anyway. -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: Android 1.5 - crash during drawing of multiline TextView
Mike wrote: I have a problem with Android 1.5 (problem that didn't appear in 1.1 and earlier): This TextView is in RelativeLayout: TextView android:id=@+id/list_item_name android:layout_width=wrap_content android:layout_height=wrap_content android:text=Some Text android:textColor=@color/black android:layout_toRightOf=@id/list_item_marker android:layout_marginLeft=8dip android:layout_marginTop=5dip android:textSize=@dimen/ts_item_top android:paddingRight=70dip / Layout is filled and used inside ListView programmatically. Whenever I have text that should be wrapped to multiple lines, this exception raises: snip 05-06 14:44:22.360: ERROR/AndroidRuntime(1009): java.lang.StackOverflowError How deep and complicated is your view hierarchy? With Android 1.5, I get the sense that StackOverflowError will be triggered by a too-complex set of views, particularly in terms of depth. You can use hierarchyviewer (in the tools/ of your SDK) to see how many layers you have -- if you're in double digits on the deepest branch, you might need to find ways to simplify the UI. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android App Developer Training: http://commonsware.com/training.html --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: Android 1.5 - crash during drawing of multiline TextView
How deep and complicated is your view hierarchy? With Android 1.5, I get the sense that StackOverflowError will be triggered by a too-complex set of views, particularly in terms of depth. You can use hierarchyviewer (in the tools/ of your SDK) to see how many layers you have -- if you're in double digits on the deepest branch, you might need to find ways to simplify the UI. It was already the case in 1.0 and 1.1 but because of new features added in Cupcake, StackOverflowException now happen a bit earlier. This means that the app was almost overflowing anyway. -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---