getDecorView().getWidth() returns incorrect values on orientationChange
<p>I'm using <code>getDecorView().getWidth()</code> to determine the sizing of some elements of my UI. Yes, I know this is a hacky approach, but I've found it to be the only reliable way to determine the actual usable width of the screen (subtracting, for example, the nav bar that is visible on the right hand of the screen on the Kindle Fire HD in landscape). The problem is that when the device's orientation changes, calling this method immediately after results in the incorrect value. Calling this same method just a split second later (by posting a delayed runnable) returns the correct value, but this approach is sort of a hack on top of a hack. Is there any way to find out when decor view is "ready" to return the correct value to me?</p>
