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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user