Bug 1197811 - Turn the LayerView into a ScrollView that scrolls to shift the surface rather than using setTranslation. r=rbarker

On Gingerbread devices (Android API 9 or 10) the ViewHelper.setTranslationY code
doesn't work to move the SurfaceView. In order to acheive that effect I turned
LayerView into a ScrollView with a dummy element at the top, and allow it to
scroll. This allows the SurfaceView to move as desired. A few places in the code
were assuming that the LayerView and SurfaceView were always at the same screen
location (which was true before but not any more) and so those sites needed
some updating as well.
This commit is contained in:
Kartikaya Gupta
2015-08-28 17:22:17 -04:00
parent 4eff4b6bd7
commit f01f76c98f
7 changed files with 94 additions and 23 deletions

View File

@@ -1636,7 +1636,7 @@ public class BrowserApp extends GeckoApp
if (mLayerView != null && height != mToolbarHeight) {
mToolbarHeight = height;
mLayerView.getDynamicToolbarAnimator().setMaxTranslation(height);
mLayerView.setMaxTranslation(height);
mDynamicToolbar.setVisible(true, VisibilityTransition.IMMEDIATE);
}
}