Add more robust view size detection.

Includes at least functional support for 
wrap_content.