Merge "Remove use of setFast* properties"
This commit is contained in:
commit
fbf0dfc523
3 files changed
+13
-32
No files matched your search
@@ -903,10 +903,6 @@ public class CellLayout extends ViewGroup {
|
|||||||
return mBackgroundAlpha;
|
return mBackgroundAlpha;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFastBackgroundAlpha(float alpha) {
|
|
||||||
mBackgroundAlpha = alpha;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setBackgroundAlphaMultiplier(float multiplier) {
|
public void setBackgroundAlphaMultiplier(float multiplier) {
|
||||||
mBackgroundAlphaMultiplier = multiplier;
|
mBackgroundAlphaMultiplier = multiplier;
|
||||||
}
|
}
|
||||||
@@ -936,11 +932,6 @@ public class CellLayout extends ViewGroup {
|
|||||||
super.setAlpha(alpha);
|
super.setAlpha(alpha);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFastAlpha(float alpha) {
|
|
||||||
setFastChildrenAlpha(alpha);
|
|
||||||
super.setFastAlpha(alpha);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void setChildrenAlpha(float alpha) {
|
private void setChildrenAlpha(float alpha) {
|
||||||
final int childCount = getChildCount();
|
final int childCount = getChildCount();
|
||||||
for (int i = 0; i < childCount; i++) {
|
for (int i = 0; i < childCount; i++) {
|
||||||
@@ -948,13 +939,6 @@ public class CellLayout extends ViewGroup {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setFastChildrenAlpha(float alpha) {
|
|
||||||
final int childCount = getChildCount();
|
|
||||||
for (int i = 0; i < childCount; i++) {
|
|
||||||
getChildAt(i).setFastAlpha(alpha);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public View getChildAt(int x, int y) {
|
public View getChildAt(int x, int y) {
|
||||||
return mChildren.getChildAt(x, y);
|
return mChildren.getChildAt(x, y);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -624,8 +624,7 @@ public abstract class PagedView extends ViewGroup {
|
|||||||
if (child != null) {
|
if (child != null) {
|
||||||
float scrollProgress = getScrollProgress(screenCenter, child, i);
|
float scrollProgress = getScrollProgress(screenCenter, child, i);
|
||||||
float alpha = 1 - Math.abs(scrollProgress);
|
float alpha = 1 - Math.abs(scrollProgress);
|
||||||
child.setFastAlpha(alpha);
|
child.setAlpha(alpha);
|
||||||
child.fastInvalidate();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
invalidate();
|
invalidate();
|
||||||
|
|||||||
@@ -854,7 +854,7 @@ public class Workspace extends SmoothPagedView
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (keepUpdating) {
|
if (keepUpdating) {
|
||||||
fastInvalidate();
|
invalidate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1166,13 +1166,12 @@ public class Workspace extends SmoothPagedView
|
|||||||
backgroundAlphaInterpolator(Math.abs(scrollProgress)));
|
backgroundAlphaInterpolator(Math.abs(scrollProgress)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cl.setFastTranslationX(translationX);
|
cl.setTranslationX(translationX);
|
||||||
cl.setFastRotationY(rotation);
|
cl.setRotationY(rotation);
|
||||||
if (mFadeInAdjacentScreens && !isSmall()) {
|
if (mFadeInAdjacentScreens && !isSmall()) {
|
||||||
float alpha = 1 - Math.abs(scrollProgress);
|
float alpha = 1 - Math.abs(scrollProgress);
|
||||||
cl.setFastAlpha(alpha);
|
cl.setAlpha(alpha);
|
||||||
}
|
}
|
||||||
cl.fastInvalidate();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!isSwitchingState() && !isInOverscroll) {
|
if (!isSwitchingState() && !isInOverscroll) {
|
||||||
@@ -1652,16 +1651,15 @@ public class Workspace extends SmoothPagedView
|
|||||||
for (int index = 0; index < getChildCount(); index++) {
|
for (int index = 0; index < getChildCount(); index++) {
|
||||||
final int i = index;
|
final int i = index;
|
||||||
final CellLayout cl = (CellLayout) getChildAt(i);
|
final CellLayout cl = (CellLayout) getChildAt(i);
|
||||||
invalidate();
|
|
||||||
if (mOldAlphas[i] == 0 && mNewAlphas[i] == 0) {
|
if (mOldAlphas[i] == 0 && mNewAlphas[i] == 0) {
|
||||||
cl.fastInvalidate();
|
cl.setTranslationX(mNewTranslationXs[i]);
|
||||||
cl.setFastTranslationX(mNewTranslationXs[i]);
|
cl.setTranslationY(mNewTranslationYs[i]);
|
||||||
cl.setFastTranslationY(mNewTranslationYs[i]);
|
cl.setScaleX(mNewScaleXs[i]);
|
||||||
cl.setFastScaleX(mNewScaleXs[i]);
|
cl.setScaleY(mNewScaleYs[i]);
|
||||||
cl.setFastScaleY(mNewScaleYs[i]);
|
cl.setBackgroundAlpha(mNewBackgroundAlphas[i]);
|
||||||
cl.setFastBackgroundAlpha(mNewBackgroundAlphas[i]);
|
|
||||||
cl.setBackgroundAlphaMultiplier(mNewBackgroundAlphaMultipliers[i]);
|
cl.setBackgroundAlphaMultiplier(mNewBackgroundAlphaMultipliers[i]);
|
||||||
cl.setFastAlpha(mNewAlphas[i]);
|
cl.setAlpha(mNewAlphas[i]);
|
||||||
|
cl.setRotationY(mNewRotationYs[i]);
|
||||||
} else {
|
} else {
|
||||||
LauncherViewPropertyAnimator a = new LauncherViewPropertyAnimator(cl);
|
LauncherViewPropertyAnimator a = new LauncherViewPropertyAnimator(cl);
|
||||||
a.translationX(mNewTranslationXs[i])
|
a.translationX(mNewTranslationXs[i])
|
||||||
@@ -1692,7 +1690,7 @@ public class Workspace extends SmoothPagedView
|
|||||||
bgAnim.setInterpolator(mZoomInInterpolator);
|
bgAnim.setInterpolator(mZoomInInterpolator);
|
||||||
bgAnim.addUpdateListener(new LauncherAnimatorUpdateListener() {
|
bgAnim.addUpdateListener(new LauncherAnimatorUpdateListener() {
|
||||||
public void onAnimationUpdate(float a, float b) {
|
public void onAnimationUpdate(float a, float b) {
|
||||||
cl.setFastBackgroundAlpha(
|
cl.setBackgroundAlpha(
|
||||||
a * mOldBackgroundAlphas[i] +
|
a * mOldBackgroundAlphas[i] +
|
||||||
b * mNewBackgroundAlphas[i]);
|
b * mNewBackgroundAlphas[i]);
|
||||||
cl.setBackgroundAlphaMultiplier(
|
cl.setBackgroundAlphaMultiplier(
|
||||||
|
|||||||
Reference in new issue
Block a user