Don't have Telegram yet? Try it now!
http://thewayofcoding.com/2016/04/get-the-size-of-a-custom-view-before-display/
Android: Get the size of a custom view before display