Merge "fixed vertical parallax" into honeycomb
This commit is contained in:
committed by
Android (Google) Code Review
commit
8dcd99eaf7
@@ -616,7 +616,7 @@ public class Workspace extends SmoothPagedView
|
|||||||
Display display = mLauncher.getWindowManager().getDefaultDisplay();
|
Display display = mLauncher.getWindowManager().getDefaultDisplay();
|
||||||
int wallpaperTravelHeight = (int) (display.getHeight() *
|
int wallpaperTravelHeight = (int) (display.getHeight() *
|
||||||
wallpaperTravelToScreenHeightRatio(display.getWidth(), display.getHeight()));
|
wallpaperTravelToScreenHeightRatio(display.getWidth(), display.getHeight()));
|
||||||
float offsetFromCenter = (wallpaperTravelHeight / mWallpaperHeight) / 2f;
|
float offsetFromCenter = (wallpaperTravelHeight / (float) mWallpaperHeight) / 2f;
|
||||||
switch (offsetPosition) {
|
switch (offsetPosition) {
|
||||||
case TOP:
|
case TOP:
|
||||||
offset = 0.5f - offsetFromCenter;
|
offset = 0.5f - offsetFromCenter;
|
||||||
|
|||||||
Reference in New Issue
Block a user