keyboardsurfer/Crouton — pull request #114 by ataulm (2013-07-09 13:06:39+00:00)
Title: Fix bug 112 - Gravity incorrectly applied

- The Gravity attribute is currently applied on the TextView inside the contentView, a RelativeLayout. The TextView is the same height as the RelativeLayout, so it appears as though vertical Gravity settings (CENTER, CENTER_VERTICAL) aren't being applied correctly
- I changed it so that the RelativeLayout fills the croutonView, and also adds a layout rule based on the Gravity attribute. Now the RelativeLayout and FrameLayout are the same dimensions, but the TextView is full width, and wrap content for height, so it's able to use the RL rules for vertical positioning and as before with horizontal positioning.
- The fix only works with CENTER, CENTER_HORIZONTAL, and CENTER_VERTICAL; it hasn't been tested with RIGHT, LEFT etc.

---

Please let me know how I can improve my pull requests.