Merge "Tweaking feel of All Apps transition" into honeycomb
This commit is contained in:
committed by
Android (Google) Code Review
commit
de4149cf71
@@ -9,7 +9,7 @@
|
||||
|
||||
<!-- Duration in milliseconds of the all apps / configuration zoom-in animation. -->
|
||||
<!-- NB: This should be less than the workspaceShrinkTime as they happen together. -->
|
||||
<integer name="config_allAppsZoomInTime">900</integer>
|
||||
<integer name="config_allAppsZoomInTime">1450</integer>
|
||||
|
||||
<!-- Duration in milliseconds of the transition between tabs in the all apps/customize
|
||||
tray -->
|
||||
@@ -17,10 +17,10 @@
|
||||
|
||||
<!-- Duration in milliseconds of the all apps zoom-out animation -->
|
||||
<!-- NB: This should be less than the workspaceUnshrinkTime as they happen together. -->
|
||||
<integer name="config_allAppsZoomOutTime">1400</integer>
|
||||
<integer name="config_allAppsZoomOutTime">1200</integer>
|
||||
|
||||
<!-- Scaling factor used in the all apps zooming animations -->
|
||||
<integer name="config_allAppsZoomScaleFactor">10</integer>
|
||||
<integer name="config_allAppsZoomScaleFactor">20</integer>
|
||||
|
||||
<!-- Duration in milliseconds of the all apps / configuration zoom-in animation. -->
|
||||
<!-- NB: This should be less than the workspaceShrinkTime as they happen together. -->
|
||||
@@ -36,16 +36,16 @@
|
||||
<!-- Duration in milliseconds of the animations between all apps, customize, & home.
|
||||
NOTE: If these are changed, the toolbar animation times below should also be. -->
|
||||
<integer name="config_allAppsCameraPanTime">700</integer>
|
||||
<integer name="config_allAppsFadeOutTime">400</integer>
|
||||
<integer name="config_allAppsFadeOutTime">500</integer>
|
||||
<integer name="config_customizeWorkspaceShrinkTime">800</integer>
|
||||
<integer name="config_allAppsWorkspaceShrinkTime">950</integer>
|
||||
<integer name="config_workspaceUnshrinkTime">450</integer>
|
||||
<integer name="config_allAppsWorkspaceShrinkTime">1450</integer>
|
||||
<integer name="config_workspaceUnshrinkTime">650</integer>
|
||||
|
||||
<!-- Duration in milliseconds toolbar fade in and fade out animations.
|
||||
NOTE: Fade in and fade out time should together be less the transition
|
||||
animations between all apps, customize, & the workspace. -->
|
||||
<integer name="config_toolbarButtonFadeInTime">100</integer>
|
||||
<integer name="config_toolbarButtonFadeOutTime">100</integer>
|
||||
<integer name="config_toolbarButtonFadeInTime">350</integer>
|
||||
<integer name="config_toolbarButtonFadeOutTime">200</integer>
|
||||
|
||||
<!-- When dragging items on the workspace, how much bigger (in pixels) the dragged view
|
||||
should be, as compared to the original view. If 0, it will not be scaled at all.
|
||||
|
||||
@@ -2537,7 +2537,6 @@ public final class Launcher extends Activity
|
||||
}
|
||||
|
||||
private void showToolbarButton(View button) {
|
||||
button.setAlpha(1.0f);
|
||||
button.setVisibility(View.VISIBLE);
|
||||
button.setFocusable(true);
|
||||
button.setClickable(true);
|
||||
@@ -2584,6 +2583,7 @@ public final class Launcher extends Activity
|
||||
} else {
|
||||
if (showing) {
|
||||
showToolbarButton(view);
|
||||
view.setAlpha(1f);
|
||||
} else {
|
||||
hideToolbarButton(view);
|
||||
}
|
||||
@@ -2638,7 +2638,7 @@ public final class Launcher extends Activity
|
||||
// visible. Modifying initialHeightFactor changes how much of the view is
|
||||
// initially showing, and hence the perceived angle from which the view enters.
|
||||
if (state == State.ALL_APPS) {
|
||||
final float initialHeightFactor = 0.165f;
|
||||
final float initialHeightFactor = 0.175f;
|
||||
view.setPivotY((1 - initialHeightFactor) * height);
|
||||
} else {
|
||||
final float initialHeightFactor = 0.2f;
|
||||
@@ -2690,7 +2690,7 @@ public final class Launcher extends Activity
|
||||
if (toAllApps) {
|
||||
toView.setAlpha(0f);
|
||||
ValueAnimator alphaAnim = ValueAnimator.ofFloat(0f, 1f).setDuration(duration);
|
||||
alphaAnim.setInterpolator(new DecelerateInterpolator(1.0f));
|
||||
alphaAnim.setInterpolator(new DecelerateInterpolator(1.5f));
|
||||
alphaAnim.addUpdateListener(new AnimatorUpdateListener() {
|
||||
public void onAnimationUpdate(ValueAnimator animation) {
|
||||
final float b = (Float) animation.getAnimatedValue();
|
||||
@@ -2807,7 +2807,7 @@ public final class Launcher extends Activity
|
||||
});
|
||||
ValueAnimator alphaAnim = ValueAnimator.ofFloat(0f, 1f);
|
||||
alphaAnim.setDuration(res.getInteger(R.integer.config_allAppsFadeOutTime));
|
||||
alphaAnim.setInterpolator(new DecelerateInterpolator(2.0f));
|
||||
alphaAnim.setInterpolator(new DecelerateInterpolator(1.5f));
|
||||
alphaAnim.addUpdateListener(new AnimatorUpdateListener() {
|
||||
public void onAnimationUpdate(ValueAnimator animation) {
|
||||
final float b = (Float) animation.getAnimatedValue();
|
||||
|
||||
@@ -1580,7 +1580,7 @@ public class Workspace extends SmoothPagedView
|
||||
*/
|
||||
static class ZoomOutInterpolator implements TimeInterpolator {
|
||||
private final ZInterpolator zInterpolator = new ZInterpolator(0.2f);
|
||||
private final DecelerateInterpolator decelerate = new DecelerateInterpolator(1.5f);
|
||||
private final DecelerateInterpolator decelerate = new DecelerateInterpolator(1.8f);
|
||||
|
||||
public float getInterpolation(float input) {
|
||||
return decelerate.getInterpolation(zInterpolator.getInterpolation(input));
|
||||
@@ -1815,8 +1815,8 @@ public class Workspace extends SmoothPagedView
|
||||
case BOTTOM_VISIBLE:
|
||||
// all apps
|
||||
if (animated) {
|
||||
mWallpaperOffset.setHorizontalCatchupConstant(isLandscape ? 0.49f : 0.46f);
|
||||
mWallpaperOffset.setVerticalCatchupConstant(isLandscape ? 0.49f : 0.46f);
|
||||
mWallpaperOffset.setHorizontalCatchupConstant(isLandscape ? 0.65f : 0.65f);
|
||||
mWallpaperOffset.setVerticalCatchupConstant(isLandscape ? 0.65f : 0.65f);
|
||||
mWallpaperOffset.setOverrideHorizontalCatchupConstant(true);
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user