Merge change 8825 into donut

* changes:
  Fixes 2017393. Correctly apply gravity in RelativeLayout.