screen_ui: Compute the top and bottom gaps.
am: f95e686dd0  -s ours

Change-Id: Iaa00625c3820ca4a88e1fe3dd0ef38dc03561a66