Added ability to manually invalidate layout (optional animated transition).