Fix height measurement

In Android 4.3 and later, the line 91 doesn't return any real data, so I changed to get the actual height from the dimen resource.