30.04.2013 Views

Android - CommonsWare

Android - CommonsWare

Android - CommonsWare

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Handling Platform Changes<br />

Figure 130. Hierarchy Viewer Layout View<br />

Here, we see a five-layer-deep hierarchy, because the longest chain of<br />

containers and widgets is five (from PhoneWindow$DecorView through to<br />

Button).<br />

<strong>Android</strong> has always had limits as to how deep the view hierarchy can be. In<br />

<strong>Android</strong> 1.5, though, the limit was reduced, so some applications that<br />

worked fine on <strong>Android</strong> 1.1 would crash with a StackOverflowException in the<br />

newer <strong>Android</strong>. This, of course, was frustrating to developers who never<br />

realized there was an issue with view hierarchy depth and then got caught<br />

by this change.<br />

479<br />

Subscribe to updates at http://commonsware.com Special Creative Commons BY-SA 3.0 License Edition

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!