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

Change-Id: I28c43e6f673457b8765afd965762c09cd662e5b2