The new Facebook SDK for Android (v4.0) that was released recently caused strange behavior for a customized LoginButton I'm using. Below is a comparison of how the same XML is rendered in different SDK versions.
The problem seems to be that the FB icon in SDK 4.x doesn't stretch properly to fit a custom-sized button, and at 4.0.1 the android:layout_height property is ignored altogether.
My question is how do I make the button appear in SDK 4.x like it did in SDK 3.x? Both XML and Java solutions are perfectly acceptable.
XML for SDK 3.x:
How it looks on SDK 3.x (screenshot taken on a OnePlus One, running CM11S):
XML for SDK 4.x (the button's package was renamed + I had to change the width & font a bit to match the g+ button):
How it looks on SDK 4.0 (Screenshot taken on a Genymotion Nexus 5, running unmodified 4.4.4):
How it looks on SDK 4.0.1 (Same Genymotion Nexus 5):
Additional information
Excerpt from the 4.0 -> 4.0.1 SDK change log:
Login button is updated to properly measure its size.
Related posts:
Custom Facebook login button image in Facebook Android SDK 3.5
To support different screen sizes, above the login buttons I have a ViewPagerIndicator and a ViewPager that is configured to take up all available vertical space which remains after positioning elements with defined height.