patch a phantom crash on android 2.3, because of layout params

This change fixes the problem when the layout params are not initialised properly on Android 2.3. It appears on some devices only.